statistics v0.5.0 Statistics.Math
Link to this section Summary
Functions
Get the absolute value of a number
Ceiling function
The number of k combinations of n
The constant e
Exponent function
Factorial!
Floor function
The natural log
The number of k permuations of n
The constant pi
Get a random number from erlang
Round a decimal to a specific precision
Get square root
Get the base integer from a float
Link to this section Functions
Link to this function
combination(n, k)
combination(non_neg_integer(), non_neg_integer()) :: non_neg_integer()
The number of k combinations of n
Both arguments must be integers
Examples
iex> Statistics.Math.combination(10, 3)
120
Factorial!
The natural log
( from Erlang Math module)
Examples
iex> Statistics.Math.ln(20)
2.995732273553991
iex> Statistics.Math.ln(200)
5.298317366548036
Link to this function
permutation(n, k)
permutation(non_neg_integer(), non_neg_integer()) :: non_neg_integer()
The number of k permuations of n
Examples
iex> Statistics.Math.permutation(10, 3)
720
The constant pi
(returned from Erlang Math module)
Examples
iex> Statistics.Math.pi
3.141592653589793
See :math.pow/2
.
Get a random number from erlang
Get square root
return sqrt from Erlang
Examples
iex> Statistics.Math.sqrt(9)
3.0
iex> Statistics.Math.sqrt(99)
9.9498743710662