AVAL: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
<code>AVAL ( [[expression]] )</code> | <code>AVAL ( [[expression]] )</code> | ||
| | | | ||
Try to find a value for the expression from any equations defined previously in the document. The expression will not be reduced to floats, e.g. square roots of rational numbers and transcendental functions will remain in the result. If you want to force a conversion to floats, use | Try to find a value for the expression from any equations defined previously in the document. The expression will not be reduced to floats, e.g. square roots of rational numbers and transcendental functions will remain in the result. If you want to force a conversion to floats, use <code>[[QUANTITY]]</code> instead. | ||
| | | | ||
3= | 3= | ||
Line 10: | Line 10: | ||
<code>EQDEF x = 1 over 2</code> | <code>EQDEF x = 1 over 2</code> | ||
<code>EXDEF | <code>EXDEF VAL(a^x + sin(x))</code> | ||
This will output <code>sqrt{3} + sin(1/2)</code>. | This will output <code>sqrt{3} + sin(1/2)</code>. |
Latest revision as of 12:39, 1 November 2024
Syntax
AVAL ( expression )
Implemented in iMath since version 2.2.6.
Explanation
Try to find a value for the expression from any equations defined previously in the document. The expression will not be reduced to floats, e.g. square roots of rational numbers and transcendental functions will remain in the result. If you want to force a conversion to floats, use QUANTITY
instead.
Example
EQDEF a = 3
EQDEF x = 1 over 2
EXDEF VAL(a^x + sin(x))
This will output sqrt{3} + sin(1/2)
.
See also
QUANTITY QUANTITYWITH NUMVAL NUMVALWITH VAL VALWITH AVALWITH UNIT UNITWITH