tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cosh-specialVals.js (810B)


      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");
     17 
     18 reportCompare(0, 0);