PRINTAVALWITH: Difference between revisions
(Created page with "{{Keyword | <code>{ options } PRINTAVALWITH {expression, equation|equation list }</code> | 2= Try to find a value for the expression from any equations de...") |
mNo edit summary |
||
Line 11: | Line 11: | ||
<code>EQDEF a = 3</code> | <code>EQDEF a = 3</code> | ||
<code>PRINTVALWITH a^x + sin(x), x = 1/2</code> | <code>PRINTVALWITH {a^x + sin(x), x = 1/2}</code> | ||
This will output <code>a^x + sin(x) = sqrt{3} + sin(1/2)</code>. | This will output <code>a^x + sin(x) = sqrt{3} + sin(1/2)</code>. | ||
| | | | ||
4= | 4= | ||
[[PRINTAVAL]] | [[PRINTVAL]] [[PRINTVALWITH]] [[PRINTAVAL]] | ||
| | | | ||
5=2.2.6 | 5=2.2.6 | ||
}} | }} | ||
[[Category:Evaluation]] | [[Category:Evaluation]] |
Latest revision as of 19:24, 17 October 2018
Syntax
{ options } PRINTAVALWITH {expression, equation|equation list }
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, plus the equations given as the second argument. 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 PRINTVALWITH or QUANTITYWITH instead.
Print the result as an equation with the expression on the left hand side and the value on the right hand side. This keyword is more or less a shortcut for TEXT expression =
followed by EXDEF AVALWITH(expression, equation list)
.
Example
EQDEF a = 3
PRINTVALWITH {a^x + sin(x), x = 1/2}
This will output a^x + sin(x) = sqrt{3} + sin(1/2)
.