Sha256: b4bcb2bc107c0a8fc426bbdf54b45d1ece9813df9ba530d28bec982c8d7c7d93

Contents?: true

Size: 320 Bytes

Versions: 34

Compression:

Stored size: 320 Bytes

Contents

// 20.2.2.33 Math.tanh(x)
var $export = require('./$.export')
  , expm1   = require('./$.math-expm1')
  , exp     = Math.exp;

$export($export.S, 'Math', {
  tanh: function tanh(x){
    var a = expm1(x = +x)
      , b = expm1(-x);
    return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  }
});

Version data entries

34 entries across 17 versions & 7 rubygems

Version Path
ilog-0.4.1 node_modules/core-js/modules/es6.math.tanh.js
ilog-0.4.1 node_modules/core-js/library/modules/es6.math.tanh.js
ilog-0.4.0 node_modules/core-js/modules/es6.math.tanh.js
ilog-0.4.0 node_modules/core-js/library/modules/es6.math.tanh.js
ilog-0.3.3 node_modules/core-js/modules/es6.math.tanh.js
ilog-0.3.3 node_modules/core-js/library/modules/es6.math.tanh.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/fbjs/node_modules/core-js/library/modules/es6.math.tanh.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/fbjs/node_modules/core-js/modules/es6.math.tanh.js
locomotivecms-3.4.0 app/javascript/node_modules/fbjs/node_modules/core-js/library/modules/es6.math.tanh.js
locomotivecms-3.4.0 app/javascript/node_modules/fbjs/node_modules/core-js/modules/es6.math.tanh.js
cortex-0.1.3 spec/dummy/node_modules/fbjs/node_modules/core-js/library/modules/es6.math.tanh.js
cortex-0.1.3 spec/dummy/node_modules/fbjs/node_modules/core-js/modules/es6.math.tanh.js
lanes-0.8.0 node_modules/core-js/library/modules/es6.math.tanh.js
lanes-0.8.0 node_modules/core-js/modules/es6.math.tanh.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/core-js/library/modules/es6.math.tanh.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/core-js/modules/es6.math.tanh.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/core-js/library/modules/es6.math.tanh.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/core-js/modules/es6.math.tanh.js
babel-schmooze-sprockets-0.1.3 node_modules/core-js/modules/es6.math.tanh.js
babel-schmooze-sprockets-0.1.3 node_modules/core-js/library/modules/es6.math.tanh.js