Sha256: be8bfcb06c3c63e74405c80bf53413553090b2b7364a50fdc2f6c779ae9ea136

Contents?: true

Size: 238 Bytes

Versions: 47

Compression:

Stored size: 238 Bytes

Contents

"use strict";

var exp = Math.exp;

module.exports = function (value) {
	if (isNaN(value)) return NaN;
	value = Number(value);
	if (value === 0) return 1;
	if (!isFinite(value)) return Infinity;
	return (exp(value) + exp(-value)) / 2;
};

Version data entries

47 entries across 47 versions & 3 rubygems

Version Path
govuk_publishing_components-17.6.1 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.6.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.5.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.4.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.3.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.2.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.1.1 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.1.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-17.0.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.29.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.28.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.27.1 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.27.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.26.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.25.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.24.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.23.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.22.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.21.0 node_modules/es5-ext/math/cosh/shim.js
govuk_publishing_components-16.20.1 node_modules/es5-ext/math/cosh/shim.js