os-js / osjs-calculator-application

OS.js Calculator Application

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong calculation

filips123 opened this issue · comments

The calculator calculates the wrong answer. It displays that 3 + 3 * 3 = 18, but this is incorrect. It is 3 + 3 * 3 = 3 + (3 * 3) = 12.

Also, add support for other math operations like Brackets, Exponentiation, Square root... and other mathematics symbols from https://en.wikipedia.org/wiki/List_of_mathematical_symbols.

I imagine there's a few more issues. I just lifted most of this from v2, so it needs some work :)

Should be fixed now that it's using PEMDAS 😊