[GiNaC-list] sqrt(x*x) Simplification
freddie at witherden.org
Sun Dec 14 01:13:16 CET 2008
On 13 Dec 2008, at 22:12, Richard B. Kreckel wrote:
> Look up 'possymbol' in the user manual.
That did the trick, thanks.
However, it doesn't seem to reduce the case of possymbol x("x"),
y("y"); ex expr = sqrt(x*x*y*y) or sqrt(pow(x*y,2)); Although both are
>0 and real it is not reduced to x*y. I have played around with some
of the factorization functions to no avail. Does GiNaC support this
kind of simplification? Could very well just be me missing something
in the reference (Doxygen) docs.
(Although strictly speaking I enquired about sqrt(x*x); sqrt(y*y*x*x)
where x and y are real > 0, it is something of a natural extension.)
More information about the GiNaC-list