Sha256: dbc8a9328bb7315ee24c0660257a9ea1213e7af3385530be262417c4d0792187
Contents?: true
Size: 330 Bytes
Versions: 15
Compression:
Stored size: 330 Bytes
Contents
'use strict'; var exp = Math.exp; module.exports = function (x) { var a, b; if (isNaN(x)) return NaN; x = Number(x); if (x === 0) return x; if (x === Infinity) return 1; if (x === -Infinity) return -1; a = exp(x); if (a === Infinity) return 1; b = exp(-x); if (b === Infinity) return -1; return (a - b) / (a + b); };
Version data entries
15 entries across 12 versions & 6 rubygems