import mir.test: shouldApprox; cauchyCCDF(-3.0).shouldApprox == 0.8975836; cauchyCCDF(-2.0).shouldApprox == 0.8524164; cauchyCCDF(-1.0).shouldApprox == 0.75; cauchyCCDF(0.0).shouldApprox == 0.5; cauchyCCDF(1.0).shouldApprox == 0.25; cauchyCCDF(2.0).shouldApprox == 0.1475836; cauchyCCDF(3.0).shouldApprox == 0.1024164; // Can include location/scale cauchyCCDF(-3.0, 1, 2).shouldApprox == 0.8524164; cauchyCCDF(-2.0, 1, 2).shouldApprox == 0.812833; cauchyCCDF(-1.0, 1, 2).shouldApprox == 0.75; cauchyCCDF(0.0, 1, 2).shouldApprox == 0.6475836; cauchyCCDF(1.0, 1, 2).shouldApprox == 0.5; cauchyCCDF(2.0, 1, 2).shouldApprox == 0.3524164; cauchyCCDF(3.0, 1, 2).shouldApprox == 0.25;
Ditto, with location and scale parameters (by standardizing x).