jiggzson / nerdamer

a symbolic math expression evaluator for javascript
http://www.nerdamer.com
MIT License
514 stars 82 forks source link

Simplify wrongly thinks sin(x)^2+cos(x)^2-1 = 1 #567

Closed thunderkid closed 3 years ago

thunderkid commented 4 years ago

Run simplify(sin(x)^2+cos(x)^2-1). It gives 1 instead of 0. But run it on simplify(sin(x)^2+cos(x)^2) and it correctly returns 1. However, simplify(1-1) correctly gives 0. I'm running version 1.1.5 and also checked on the demo website. Same results.

jiggzson commented 3 years ago

Got it. I'll take care of this. Thanks for reporting.