Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/cosh/cosh-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.cosh with special values
6 es6id: 20.2.2.13
7 ---*/
8
9 assert.sameValue(Math.cosh(NaN), Number.NaN,
10 "Math.cosh produces incorrect output for NaN");
11 assert.sameValue(Math.cosh(0), 1, "Math.cosh should produce 1 for input = 0");
12 assert.sameValue(Math.cosh(-0), 1, "Math.cosh should produce 1 for input = -0");
13 assert.sameValue(Math.cosh(Number.NEGATIVE_INFINITY), Number.POSITIVE_INFINITY,
14 "Math.cosh should produce Number.POSITIVE_INFINITY for Number.NEGATIVE_INFINITY");
15 assert.sameValue(Math.cosh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY,
16 "Math.cosh should produce Number.POSITIVE_INFINITY for Number.POSITIVE_INFINITY");