frontend/.pnpm-store/v3/files/46/eb348baf655d861b132262c1b494db660daa50677d1ac3b3723cd804d1a1eddd8587cdc6b1daae0fcb2ccabff375fe64345d3c4c84a43c9d39ef7d7dc2ed00

17 lines
397 B
Plaintext

// Thanks: https://github.com/monolithed/ECMAScript-6
"use strict";
var exp = Math.exp;
module.exports = function (value) {
if (isNaN(value)) return NaN;
value = Number(value);
if (value === 0) return value;
if (value === Infinity) return Infinity;
if (value === -Infinity) return -1;
if (value > -1.0e-6 && value < 1.0e-6) return value + (value * value) / 2;
return exp(value) - 1;
};