The OpenD Programming Language

normalLPDF

Computes the normal log probability density function (LPDF)

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

Parameters

x T

value to evaluate LPDF

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