The OpenD Programming Language

normalLPDF

Computes the normal log probability density function (LPDF)

  1. T normalLPDF(T x, T mean, T stdDev)
    @safe pure nothrow @nogc
    T
    normalLPDF
    (
    T
    )
    (
    const T x
    ,
    const T mean
    ,
    const T stdDev
    )
    if (
    isFloatingPoint!T
    )
  2. T normalLPDF(T x)

Parameters

x T

value to evaluate LPDF

mean T

mean

stdDev T

standard deviation

Examples

import mir.math.common: approxEqual, log;
assert(0.5.normalLPDF.approxEqual(log(normalPDF(0.5))));
assert(0.5.normalLPDF(0, 1.5).approxEqual(log(normalPDF(0.5, 0, 1.5))));
assert(1.5.normalLPDF(1, 3).approxEqual(log(normalPDF(1.5, 1, 3))));

See Also

Meta