summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/Math.atanh.js
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Tests/Math.atanh.js')
-rw-r--r--Libraries/LibJS/Tests/Math.atanh.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/Math.atanh.js b/Libraries/LibJS/Tests/Math.atanh.js
new file mode 100644
index 0000000000..c09003859c
--- /dev/null
+++ b/Libraries/LibJS/Tests/Math.atanh.js
@@ -0,0 +1,14 @@
+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);
+}