Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/atanh/atanh-specialVals.js

raw
1 // Copyright 2015 Microsoft Corporation. All rights reserved.
2 // This code is governed by the license found in the LICENSE file.
3
4 /*---
5 description: Math.atanh with special values
6 es6id: 20.2.2.7
7 ---*/
8
9 assert.sameValue(Math.atanh(-1.9), Number.NaN,
10 "Math.atanh produces incorrect output for -1.9");
11 assert.sameValue(Math.atanh(NaN), Number.NaN,
12 "Math.atanh produces incorrect output for NaN");
13 assert.sameValue(Math.atanh(-10), Number.NaN,
14 "Math.atanh produces incorrect output for -10");
15 assert.sameValue(Math.atanh(-Infinity), Number.NaN,
16 "Math.atanh produces incorrect output for -Infinity");
17 assert.sameValue(Math.atanh(1.9), Number.NaN,
18 "Math.atanh produces incorrect output for 1.9");
19 assert.sameValue(Math.atanh(10), Number.NaN,
20 "Math.atanh produces incorrect output for 10");
21 assert.sameValue(Math.atanh(Number.POSITIVE_INFINITY), Number.NaN,
22 "Math.atanh produces incorrect output for Number.POSITIVE_INFINITY");
23
24 assert.sameValue(Math.atanh(-1), Number.NEGATIVE_INFINITY,
25 "Math.atanh should produce negative infinity for -1");
26 assert.sameValue(Math.atanh(+1), Number.POSITIVE_INFINITY,
27 "Math.atanh should produce positive infinity for +1");
28 assert.sameValue(1 / Math.atanh(-0), Number.NEGATIVE_INFINITY,
29 "Math.atanh should produce -0 for -0");
30 assert.sameValue(1 / Math.atanh(0), Number.POSITIVE_INFINITY,
31 "Math.atanh should produce +0 for +0");