For even k and real valued x, abs(x)^k=x^k. This is not taken into account.
realvalued x;
abs(x)^4;
returns abs(x)^4 and not x^4. Maybe something like a let rule
for all x,k such that (realvaluedp(x) and numberp(k) and fixp(k) and evenp(k)) let abs(x)^k =x^k;
could be added somewhere.
Thanks for reporting this.
Actually there is already a rule
let {abs(~x)^2 => x^2 when symbolic not !*precise
(Try
showrules ^
)Changing the rule to
let {abs(~x)^2 => x^2 when symbolic not !*precise or realvaluedp x
should do the trick.
I need to check that this proposed change doesn't cause mayhem elsewhere, then I will commit it.
Correction committed to sources.