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