MikeMcl/decimal.js

decimal result is NaN of string

zhongmeizhi opened this issue · 2 comments

decimal result is NaN of string

example:

   new Decimal('0.00').div('0.00').toPrecision(2)  === 'NaN'

I don't understand you. What is the issue here?

The type of the return value of toPrecision will always be "string".

Number.isNaN(0 / 0);     // true

I see;