Computes the bernoulli cumulatve distribution function (CDF).
value to evaluate CDF
true probability
import mir.math.common: approxEqual; assert(true.bernoulliCDF(0.5) == 1); assert(false.bernoulliCDF(0.5) == 0.5); assert(true.bernoulliCDF(0.7) == 1); assert(false.bernoulliCDF(0.7).approxEqual(0.3));
Bernoulli Distribution
See Implementation
Computes the bernoulli cumulatve distribution function (CDF).