adamwdraper / Numeral-js

A javascript library for formatting and manipulating numbers.
http://numeraljs.com
MIT License
9.65k stars 926 forks source link

numeral(0.0).add(numeral(0.000002 * 0.24).value()).value() returns 0 instead of 4.8e-7 #789

Open imalkevich opened 9 months ago

imalkevich commented 9 months ago

Hi Team,

Wondering how to use this library if I would like the following code to return me expected value?

numeral(0.0).add(numeral(0.000002 * 0.24).value()).value()

Currently it returns 0, while I would expect it to be 4.8e-7.

Thanks