The OpenD Programming Language

laplaceInvCDF

Ditto, with location and scale parameters (by standardizing x).

  1. T laplaceInvCDF(T p)
  2. T laplaceInvCDF(T p, T location, T scale)
    T
    laplaceInvCDF
    (
    T
    )
    (
    const T p
    ,
    const T location
    ,
    const T scale
    )
    if (
    isFloatingPoint!T
    )

Parameters

p T

value to evaluate InvCDF

location T

location parameter

scale T

scale parameter

Examples

import mir.test: shouldApprox;

laplaceInvCDF(0.0).shouldApprox == -double.infinity;
laplaceInvCDF(0.25).shouldApprox == -0.6931472;
laplaceInvCDF(0.5).shouldApprox == 0.0;
laplaceInvCDF(0.75).shouldApprox == 0.6931472;
laplaceInvCDF(1.0).shouldApprox == double.infinity;

// Can also provide location/scale parameters
laplaceInvCDF(0.2, 2, 3).shouldApprox == -0.7488722;
laplaceInvCDF(0.4, 2, 3).shouldApprox == 1.330569;
laplaceInvCDF(0.6, 2, 3).shouldApprox == 2.669431;
laplaceInvCDF(0.8, 2, 3).shouldApprox == 4.748872;

See Also

Meta