jiggzson / nerdamer

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

Simplifying complex numbers #615

Open szoshi opened 3 years ago

szoshi commented 3 years ago

I have run into an issue with simplifying certain complex numbers. Numbers of the form (a+ib) / (c + id) are simplified correctly. There seems to be a problem with numbers of the type a / (c+id) though. For example, if i simplify -8/(2 + 3i) I get 2+3i. maybe it also affects numbers of the form bi/(c+id) but I have not checked it yet.