Naruyoko / OmegaNum.js

A huge number library holding up to 10{1000}9e15. A basement for planned {10,x,1,2}.
https://naruyoko.github.io/OmegaNum.js/index.html
MIT License
32 stars 15 forks source link

Unexpected NaN in add #22

Closed Reinhardt-C closed 4 years ago

Reinhardt-C commented 5 years ago
OmegaNum.add(0, 1e16).toString();
"NaN"

I'm too lazy to fix it rn

Naruyoko commented 4 years ago

α 1.0.2

James103 commented 4 years ago

Expected result:

OmegaNum.add(0, 1e16).toString();
"1e16"

My testing from https://naruyoko.github.io/OmegaNum.js/index.html:

OmegaNum.add(0, 1e16).toString();
"1e16"

Result: This is accurate. 0 plus any number X should return that number X no matter how big/small it is.