ladybird/Libraries/LibJS/Tests/builtins/Math/Math.atanh.js

15 lines
356 B
JavaScript
Raw Normal View History

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