import mir.test: shouldApprox; laplaceCDF(-2.0).shouldApprox == 0.06766764; laplaceCDF(-1.0).shouldApprox == 0.1839397; laplaceCDF(-0.5).shouldApprox == 0.3032653; laplaceCDF(0.0).shouldApprox == 0.5; laplaceCDF(0.5).shouldApprox == 0.6967347; laplaceCDF(1.0).shouldApprox == 0.8160603; laplaceCDF(2.0).shouldApprox == 0.9323324; // Can also provide location/scale parameters laplaceCDF(-1.0, 2.0, 3.0).shouldApprox == 0.1839397; laplaceCDF(1.0, 2.0, 3.0).shouldApprox == 0.3582657; laplaceCDF(4.0, 2.0, 3.0).shouldApprox == 0.7432914;
Ditto, with location and scale parameters (by standardizing x).