UNPKG

compound-ex4

Version:

Compound-ex4 - MVC framework for NodeJS (ExpressJs 4 version), fork compoundjs(https://github.com/1602/compound)

12 lines (9 loc) 206 B
'use strict'; var exp = Math.exp; module.exports = function (x) { if (isNaN(x)) return NaN; x = Number(x); if (x === 0) return 1; if (!isFinite(x)) return Infinity; return (exp(x) + exp(-x)) / 2; };