whatgoodisaroad / Big-js

An arbitrary precision math library for JavaScript
http://big-js.thatscaptaintoyou.com/
44 stars 6 forks source link

How many bits are supported #10

Open Mr-wangyoushuai opened 4 years ago

Mr-wangyoushuai commented 4 years ago

new Big(100000000000000.24) => 100000000000000.23

silentmatt commented 4 years ago

You're seeing that because by the time the number gets to the Big constructor, JavaScript has already rounded it. Try passing in a string, like this: new Big('100000000000000.24').