.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / es.math.tanh.js
1 var $ = require('../internals/export');
2 var expm1 = require('../internals/math-expm1');
3
4 var exp = Math.exp;
5
6 // `Math.tanh` method
7 // https://tc39.es/ecma262/#sec-math.tanh
8 $({ target: 'Math', stat: true }, {
9   tanh: function tanh(x) {
10     var a = expm1(x = +x);
11     var b = expm1(-x);
12     return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
13   }
14 });