The OpenD Programming Language

geometricInvCDF

Computes the geometric inverse cumulative distribution function (InvCDF).

@safe pure @nogc nothrow
T
geometricInvCDF
(
T
)
(
const T q
,
const T p
)
if (
isFloatingPoint!T
)

Parameters

q T

value to evaluate InvCDF

p T

true probability

Examples

import mir.test: should;

0.geometricInvCDF(0.5).should == -1;
0.5.geometricInvCDF(0.5).should == 0;
0.75.geometricInvCDF(0.5).should == 1;
0.875.geometricInvCDF(0.5).should == 2;
0.95.geometricInvCDF(0.5).should == 4;

0.geometricInvCDF(0.25).should == -1;
0.25.geometricInvCDF(0.25).should == 0;
0.4375.geometricInvCDF(0.25).should == 1;
0.578125.geometricInvCDF(0.25).should == 2;
0.95.geometricInvCDF(0.25).should == 10;

0.5.geometricInvCDF(1).should == 0;
1.geometricInvCDF(0.5).should == double.infinity;

See Also

Meta