Closed septs closed 3 years ago
// 1 + 2 BigNumber.calc('+', '1', '2') // 1 + (2 * 3) BigNumber.calc('+', '1', ['*', '2', '3']) // 10 * (10 ** 100) BigNumber.calc('*', '10', ['**', '10', '100']) // 5 - (6 * 7) BigNumber.calc('*', '-', '5', '6', '7') // etc
by built-in polish notation calculator simplify code and logic.
see https://en.wikipedia.org/wiki/Polish_notation see https://en.wikipedia.org/wiki/S-expression
Are you suggesting that I implement this?
I have extended my other library decimal.js with an expression evaluator.
by built-in polish notation calculator simplify code and logic.
see https://en.wikipedia.org/wiki/Polish_notation see https://en.wikipedia.org/wiki/S-expression