Closed pripersian closed 3 years ago
why you use toFixed()?
@Brucedayton
toFIxed()
is used to ensure that exponential notation is not used.
Conversely, toExponential()
is used to ensure that exponential notation is used.
The mistake made above is that 4563579969884408065
should have been passed as a string, as it is too large for a JavaScript number.
We have code
We have result 4549889229974755075100
But in calculator or other library we have result = 4549889229974754840805