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