www.delorie.com/gnu/docs/calc/calc_276.html | search |
Buy the book! | |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The a r (calc-rewrite
) [rewrite
] command makes
substitutions in a formula according to a specified pattern or patterns
known as rewrite rules. Whereas a b (calc-substitute
)
matches literally, so that substituting `sin(x)' with `cos(x)'
matches only the sin
function applied to the variable x
,
rewrite rules match general kinds of formulas; rewriting using the rule
`sin(x) := cos(x)' matches sin
of any argument and replaces
it with cos
of that same argument. The only significance of the
name x
is that the same name is used on both sides of the rule.
Rewrite rules rearrange formulas already in Calc's memory. See section 7.8.8 Syntax Tables, to read about syntax rules, which are similar to algebraic rewrite rules but operate when new algebraic entries are being parsed, converting strings of characters into Calc formulas.
webmaster donations bookstore | delorie software privacy |
Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |