OmegaNum.js icon indicating copy to clipboard operation
OmegaNum.js copied to clipboard

Max Safe Integer

Open Jacorb90 opened this issue 5 years ago • 1 comments

Heya, so I don't know if this is in your control, but calculations around Number.MAX_SAFE_INTEGER (about 9e15) are kinda inaccurate, which sucks for being such a relatively low value. For example, if I put in the console: OmegaNum.div(9.4e13, 9.4e14), it returns 0.1 (as it should) but if I put in OmegaNum.div(9.4e14, 9.4e15), it returns 0 because it crosses the threshold of Number.MAX_SAFE_INTEGER (presumably when the array gets pushed to two values).

Hopefully this could be fixed, as it does cause a few issues in calculations for an incremental game i'm making using your library.

Thanks, Jacorb

Jacorb90 avatar Aug 06 '20 03:08 Jacorb90

0.5.6

Naruyoko avatar Aug 20 '20 00:08 Naruyoko