module Math

Included Modules

Extended Modules

Defined in:

lib/math/coef_binomial.cr
lib/math/exceptions.cr
lib/math/factorial.cr

Instance Method Summary

Instance methods inherited from module Math::Factorial

factorial(n : Number) factorial

Instance Method Detail

def binomial_distribution(tries : Int, success : Int, probability : Number) #

Computes the Binomial distributions of success among tries given a probability of success.

NOTE if no named parameters are used, then it will try to use the unamed parameters (tries, success, probability).


[View source]
def coef_binomial(n : Int, k : Int) #

Computes the binomial coefficient of (n, k)


[View source]