ladybird/Libraries/LibJS/Tests/builtins/Math/Math.atanh.js
2020-07-03 19:30:13 +02:00

14 lines
356 B
JavaScript

load("test-common.js");
try {
assert(isNaN(Math.atanh(-2)));
assert(Math.atanh(-1) === -Infinity);
// FIXME: assert(Math.atanh(0) === 0);
assert(isClose(Math.atanh(0.5), 0.549306));
// FIXME: assert(Math.atanh(1) === Infinity);
assert(isNaN(Math.atanh(2)));
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}