jamsesso / json-logic-java

A pure Java implementation of JsonLogic without using the Nashorn JS engine
MIT License
99 stars 50 forks source link

Replace double with BigDecimal #31

Closed biswajit-togai closed 1 year ago

biswajit-togai commented 2 years ago

Resolving #32 by using BigDecimal instead of double

jamsesso commented 1 year ago

Unfortunately I cannot accept this PR. BigDecimal has performance implications and the JS version is subject to the same floating point issue as any other language using IEEE754. You can try the rule {"+": [0.1, 0.2]} on https://jsonlogic.com/play.html to see for yourself.