/arithmetic-parser

Arithmetic, like a boss.

Primary LanguageJavaScript

Arithmetic Parser

Parse an arithmetic string, respecting order of operations.

Please Excuse My Dear Aunt Sally. Fourth grade FTW

arithmetic.js is using the shunting-yard algorithm, which is used to convert an arithmetic expression into reverse polish notation. Reverse polish notation is great for this use case because it semantically expresses the order of operations of a mathematic formula.

Check it out with a mediocore UI: http://danielna.github.io/arithmetic-parser