projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Version 1
[yaffs-website]
/
node_modules
/
core-js
/
modules
/
es6.math.tanh.js
1
// 20.2.2.33 Math.tanh(x)
2
var $export = require('./_export')
3
, expm1 = require('./_math-expm1')
4
, exp = Math.exp;
5
6
$export($export.S, 'Math', {
7
tanh: function tanh(x){
8
var a = expm1(x = +x)
9
, b = expm1(-x);
10
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
11
}
12
});