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;
Ditto, with location and scale parameters (by standardizing x).