MCPcopy Create free account
hub / github.com/microsoft/SandDance / densityLogNormal

Function densityLogNormal

docs/tests/v2/es6/js/sanddance.js:87302–87308  ·  view source on GitHub ↗
(value, mean, stdev)

Source from the content-addressed store, hash-verified

87300}
87301
87302function densityLogNormal(value, mean, stdev) {
87303 if (value <= 0) return 0;
87304 mean = mean || 0;
87305 stdev = stdev == null ? 1 : stdev;
87306 const z = (Math.log(value) - mean) / stdev;
87307 return Math.exp(-0.5 * z * z) / (stdev * _constants.SQRT2PI * value);
87308}
87309
87310function cumulativeLogNormal(value, mean, stdev) {
87311 return (0, _normal.cumulativeNormal)(Math.log(value), mean, stdev);

Callers 1

_defaultFunction · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected