source: trip-planner-front/node_modules/core-js/modules/es.math.cosh.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 474 bytes
Line 
1var $ = require('../internals/export');
2var expm1 = require('../internals/math-expm1');
3
4// eslint-disable-next-line es/no-math-cosh -- required for testing
5var $cosh = Math.cosh;
6var abs = Math.abs;
7var E = Math.E;
8
9// `Math.cosh` method
10// https://tc39.es/ecma262/#sec-math.cosh
11$({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, {
12 cosh: function cosh(x) {
13 var t = expm1(abs(x) - 1) + 1;
14 return (t + 1 / (t * E * E)) * (E / 2);
15 }
16});
Note: See TracBrowser for help on using the repository browser.