raccoon commented on a Page, $cleanEquation()  -  Mar 03, 2017

How does it handle and distinguish unary negative versus binary subtraction? Eg: -3^2 and -1/2x*y and 3--2

Degausser  -  Mar 03, 2017

Negative values are something I completely overlooked, thanks! Will try updating to handle those possibilities. At the moment as you've probably noticed, it doesn't handle them at all =x

  • fixed
raccoon  -  Mar 03, 2017

Does the solution to -3^2 result in -9 or +9? The world wants to know ^_^

Degausser  -  Mar 03, 2017

It's pretty bad when someone else puts more effort into bug crunching than the author. A bit make shift, but working as expected now.. I think. Thank you. :)

raccoon  -  Mar 04, 2017

Well, to be honest, I haven't tested it. I just know the issues. :)

Even the world's most popular spreadsheet software doesn't agree on these behaviors -- if you save and load your stock market profile between Open Office, Microsoft Excel, Quattro Pro and Lotus 123, any formulas you put in that use unary negative and powers are likely to disagree from program to program. It's any wonder the stock market hasn't crashed in 3 decades!

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.