import mir.test: shouldApprox; rayleighInvCDF(0.0).shouldApprox == 0.0; rayleighInvCDF(0.25).shouldApprox == 0.7585276; rayleighInvCDF(0.5).shouldApprox == 1.17741; rayleighInvCDF(0.75).shouldApprox == 1.665109; rayleighInvCDF(1.0).shouldApprox == double.infinity; // Can also provide scale parameter rayleighInvCDF(0.2, 2).shouldApprox == 1.336094; rayleighInvCDF(0.4, 2).shouldApprox == 2.021535; rayleighInvCDF(0.6, 2).shouldApprox == 2.707457; rayleighInvCDF(0.8, 2).shouldApprox == 3.588245;
Ditto, with scale parameter.