$ fingerprint@info:~ echo $MATH-ROUTINES
Math is a built-in object that has properties and methods for mathematical constants and functions. For more details see, e.g., MDN web docs
The Specification of the Math Object states in Section 20.2.2 ECMAScript 2015:
The behaviour of the functions [...]
is not precisely specified here except to require specific results for certain argument values that represent
boundary cases of interest. For other argument values, these functions are intended to compute approximations
to the results of familiar mathematical functions, but some latitude is allowed in the choice of approximation
algorithms.
'
This leads to a precision which is implementation- and hardware-dependent. This means, due to different rounds or intermediate values, math routine results suffer inconsistencies across operating systems, math libaries, JS engines and browser versions.
$ fingerprint@info:~ run math-routines-demo
Number of Math Routine Tests: 13
Your Math Routine Result Hash: Tests are running...
Refresh page.
Math Routine | Your Value |
---|---|
Math.acos(0.123124234234234242) | |
Math.acosh(1e308) | |
Math.acoshPf(1e154) | |
Math.asin(0.123124234234234242) | |
Math.asinh(1e300) | |
Math.cosh(1) | |
Math.coshPf(1) | |
Math.expm1(1) | |
Math.expm1Pf(1) | |
Math.sinh(1) | |
Math.sinhPf(1) | |
Math.tan(-1e308) | |
Math.exp(1) !== Math.E |