Up | Prev | PrevTail | Tail |
Detailed knowlege about the sign of expressions allows REDUCE to simplify
expressions involving exponentials or abs
. You can express assumptions about the
positivity or negativity of expressions by rules for the operator sign
. Examples:
abs(a*b*c); abs(a*b*c); let sign(a)=>1,sign(b)=>1; abs(a*b*c); abs(c)*a*b on precise; sqrt(x^2-2x+1); abs(x - 1) ws where sign(x-1)=>1; x - 1
Here factors with known sign are factored out of an abs
expression.
on precise; on factor; (q*x-2q)^w; w ((x - 2)*q) ws where sign(x-2)=>1; w w q *(x - 2)
In this case the factor \((x-2)^w\) may be extracted from the base of the exponential because it is known to be positive.
Note that REDUCE knows a lot about sign propagation. For example, with \(x\) and \(y\) also \(x+y\), \(x+y+\pi \) and \((x+e)/y^2\) are known as positive. Nevertheless, it is often necessary to declare additionally the sign of a combined expression. E.g. at present a positivity declaration of \(x-2\) does not automatically lead to sign evaluation for \(x-1\) or for \(x\).
Up | Prev | PrevTail | Front |