Hello.
I have stumbled upon a problem when trying to format numbers which are in E notation with very large exponents.
Please look at the example below where the first number is correctly formatted while the second one produces an exception.
Same behavior can be observed for negative exponents:
I believe the problem is in your round function where it is returning "value.toFixed(precision);" The native Number.toFixed function appears to be limited to a maximum of 20 digits which makes formatting of above numbers break.
Could you please implement a fix which removes this limitation?
Thanks.
I have stumbled upon a problem when trying to format numbers which are in E notation with very large exponents.
Please look at the example below where the first number is correctly formatted while the second one produces an exception.
kendo.toString(5e15, "#,0.00")
"5,000,000,000,000,000.00"
kendo.toString(5e25, "#,0.00")
RangeError: toFixed() digits argument must be between 0 and 20
Same behavior can be observed for negative exponents:
kendo.toString(5e-20, "#,0.00")
"0.00"
kendo.toString(5e-21, "#,0.00")
RangeError: toFixed() digits argument must be between 0 and 20
I believe the problem is in your round function where it is returning "value.toFixed(precision);" The native Number.toFixed function appears to be limited to a maximum of 20 digits which makes formatting of above numbers break.
Could you please implement a fix which removes this limitation?
Thanks.