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