]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js
f9062bd976c693045bf93fd50cd33b76c531162d
[rbdr/dotfiles] / atom / packages / vim-mode / node_modules / grim / node_modules / emissary / node_modules / es6-weak-map / node_modules / es5-ext / math / cosh / shim.js
1 'use strict';
2
3 var exp = Math.exp;
4
5 module.exports = function (x) {
6 if (isNaN(x)) return NaN;
7 x = Number(x);
8 if (x === 0) return 1;
9 if (!isFinite(x)) return Infinity;
10 return (exp(x) + exp(-x)) / 2;
11 };