Why Does Javascript Math.log(1.001) Return The Wrong Value?
JavaScript returns .0009995003330834232. Every other way of calculating returns 0.000434077479319.
Solution 1:
It returns the natural logarithm, i.e. the logarithm to base e = 2.71828...
, instead of the logarithm to base 10.
log_e(1.001) = 0.00099950033308342321
log_10(1.001) = 0.0004340774793185929
Post a Comment for "Why Does Javascript Math.log(1.001) Return The Wrong Value?"