Sha256: 0e3a95914ea6cb1ab5f8ab5a1d96760973fa53ff00c567e4b5ba1abe5f338648
Contents?: true
Size: 428 Bytes
Versions: 25
Compression:
Stored size: 428 Bytes
Contents
var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); var nativeCosh = Math.cosh; var abs = Math.abs; var E = Math.E; // `Math.cosh` method // https://tc39.github.io/ecma262/#sec-math.cosh $({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, { cosh: function cosh(x) { var t = expm1(abs(x) - 1) + 1; return (t + 1 / (t * E * E)) * (E / 2); } });
Version data entries
25 entries across 25 versions & 7 rubygems