On Alpine Linux/i686, Math.tanh(0.5) differs from the reference
expression (Math.E - 1)/(Math.E + 1) by one ULP (about 5.55e-17).
The exact comparison fails with both SSE and x87 builds.
Allow an absolute difference of Number.EPSILON, as in the tests
for Math.atanh() and Math.acosh().
{ njs_str("Math.tanh(-Infinity)"),
njs_str("-1") },
{ njs_str("Math.tanh(-Infinity)"),
njs_str("-1") },
- { njs_str("Math.tanh(0.5) - (Math.E - 1)/(Math.E + 1)"),
- njs_str("0") },
+ { njs_str("Math.abs(Math.tanh(0.5) - (Math.E - 1)/(Math.E + 1))"
+ " <= Number.EPSILON"),
+ njs_str("true") },
{ njs_str("Math.trunc(3.9)"),
njs_str("3") },
{ njs_str("Math.trunc(3.9)"),
njs_str("3") },