The OpenD Programming Language

laplaceCCDF

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

  1. T laplaceCCDF(T x)
  2. T laplaceCCDF(T x, T location, T scale)
    T
    laplaceCCDF
    (
    T
    )
    (
    const T x
    ,
    const T location
    ,
    const T scale
    )
    if (
    isFloatingPoint!T
    )

Parameters

x T

value to evaluate CCDF

location T

location parameter

scale T

scale parameter

Examples

import mir.test: shouldApprox;

laplaceCCDF(-2.0).shouldApprox == 0.9323324;
laplaceCCDF(-1.0).shouldApprox == 0.8160603;
laplaceCCDF(-0.5).shouldApprox == 0.6967347;
laplaceCCDF(0.0).shouldApprox == 0.5;
laplaceCCDF(0.5).shouldApprox == 0.3032653;
laplaceCCDF(1.0).shouldApprox == 0.1839397;
laplaceCCDF(2.0).shouldApprox == 0.06766764;

// Can also provide location/scale parameters
laplaceCCDF(-1.0, 2.0, 3.0).shouldApprox == 0.8160603;
laplaceCCDF(1.0, 2.0, 3.0).shouldApprox == 0.6417343;
laplaceCCDF(4.0, 2.0, 3.0).shouldApprox == 0.2567086;

Meta