1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-13 19:52:07 +00:00
serenity/Libraries/LibJS/Tests/Math.atanh.js
2020-06-22 10:33:50 +02:00

14 lines
336 B
JavaScript

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