logoalt Hacker News

hnarayanantoday at 7:30 AM1 replyview on HN

This is a general pattern in CAS. For a more basic case, it’s not obvious sqrt(square(x)) will simplify to x without any further assumptions on x.


Replies

burnt-resistortoday at 8:30 AM

That's not what it simplifies to using a real or complex number domains for x, it's abs(x). CAS need type inference assumptions and/or type qualifiers to be more powerful.

Edit: Fixed stuff.

show 2 replies