MikeMcl / decimal.js

An arbitrary-precision Decimal type for JavaScript
http://mikemcl.github.io/decimal.js
MIT License
6.35k stars 480 forks source link

Slight loss of precision in some cases #204

Closed avin-kavish closed 2 years ago

avin-kavish commented 2 years ago

When I run your test cases locally, out of 999 tests in the add suite, 45 fail due to a slight loss in precision. Is that expected?

--1.1919832154850000000000000000000000000000000000000000000000000000000000000001e+86367116961620         
+-1.191983215485e+86367116961620
avin-kavish commented 2 years ago

It turned out to be a configuration issue on my end.