The OpenD Programming Language

cauchyCCDF

Ditto, with location and scale parameters (by standardizing x).

  1. T cauchyCCDF(T x)
  2. T cauchyCCDF(T x, T location, T scale)
    @safe pure nothrow @nogc
    T
    cauchyCCDF
    (
    T
    )
    (
    const T x
    ,
    const T location
    ,
    const T scale
    )
    if (
    isFloatingPoint!T
    )

Parameters

x T

value to evaluate CCDF

location T

location parameter

scale T

scale parameter

Examples

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;

Meta