NumEx v0.1.0 MathematicalFunc View Source
A module to perform mathematical functions
Link to this section Summary
Functions
Takes a list of elements and computes the acos function element wise
Takes a list of elements and computes the acosh function element wise
Add arguments element-wise
Takes a list of elements and computes the asin function element wise
Takes a list of elements and computes the asin function element wise
Takes a list of elements and computes the atan function element wise
Takes a list of elements and computes the atanh function element wise
Return the ceiling of the input, element-wise
Takes a list of elements and computes the cos function element wise
Takes a list of elements and computes the cosh function element wise
Convets the angle value in degrees to radians
Calculate exp(x) - 1 for all elements in the array
Calculate the exponential of all elements in the input array
Calculate :math.pow(2, x) for all x in the input array
Return the floor of the input, element-wise
Takes the values of two sides of a right angled triangle and gives the hypotenuse
Natural logarithm, element-wise
Return the base 10 logarithm of the input array, element-wise
Return the natural logarithm of one plus the input array, element-wise
Base-2 logarithm of x for all x in input array
Logarithm of the sum of exponentiations of the inputs
Logarithm of the sum of exponentiations of the inputs in base-2
Convets the angle value in radians to degrees
Round elements of the array to the nearest number
Takes a list of elements and computes the sine function element wise
Return the sinc function
Takes a list of elements and computes the Hyperbolic sine function element wise
Takes a list of elements and computes the tan function element wise
Takes a list of elements and computes the tanh function element wise
Return the truncated value of the input, element-wise
Link to this section Functions
Takes a list of elements and computes the acos function element wise .
Examples
iex> MathematicalFunc.acos([1, 0, -1, 0.8, -0.45])
["0.00", "1.57", "3.14", "0.64", "2.04"]
Takes a list of elements and computes the acosh function element wise .
Examples
iex> MathematicalFunc.acosh([1,2,34,4,5])
["0.00", "1.32", "4.22", "2.06", "2.29"]
Takes a list of elements and computes the asin function element wise .
Examples
iex> MathematicalFunc.asin([1, -1, 0, 0.65, -0.98])
["1.57", "-1.57", "0.00", "0.71", "-1.37"]
Takes a list of elements and computes the asin function element wise .
Examples
iex> MathematicalFunc.asinh([1,2,34,4,5])
["0.88", "1.44", "4.22", "2.10", "2.31"]
Takes a list of elements and computes the atan function element wise .
Examples
iex> MathematicalFunc.atan([1,45])
["0.79", "1.55"]
Takes a list of elements and computes the atanh function element wise .
Examples
iex> MathematicalFunc.atanh([0.8, 0.9])
["1.10", "1.47"]
Return the ceiling of the input, element-wise.
Examples
iex> MathematicalFunc.ceil([3.89, 4.70, 5.62])
[4.0, 5.0, 6.0]
Takes a list of elements and computes the cos function element wise .
Examples
iex> MathematicalFunc.cos([1,2,34,4,5])
["0.54", "-0.42", "-0.85", "-0.65", "0.28"]
Takes a list of elements and computes the cosh function element wise .
Examples
iex> MathematicalFunc.cosh([1,2,34,4,5])
["1.54", "3.76", "291730871263727.43", "27.31", "74.21"]
Calculate exp(x) - 1 for all elements in the array.
Examples
iex> MathematicalFunc.exmp([2, 3, 5])
[6.38, 19.08, 147.41]
Calculate the exponential of all elements in the input array.
Examples
iex> MathematicalFunc.exp([2,3,5])
[7.38, 20.08, 148.41]
Calculate :math.pow(2, x) for all x in the input array.
Examples
iex> MathematicalFunc.exp2([4, 5, 6])
[16.0, 32.0, 64.0]
Return the floor of the input, element-wise.
Examples
iex> MathematicalFunc.floor([3.89, 4.70, 5.62])
[3.0, 4.0, 5.0]
Takes the values of two sides of a right angled triangle and gives the hypotenuse .
Examples
iex> MathematicalFunc.hypot(3, 4)
5.0
Natural logarithm, element-wise.
Examples
iex> MathematicalFunc.log([3, 4, 5, 8])
[0.47, 0.60, 0.69, 0.90]
Return the base 10 logarithm of the input array, element-wise.
Examples
iex> MathematicalFunc.log10([10, 100, 1000])
[1.0, 2.0, 3.0]
Return the natural logarithm of one plus the input array, element-wise.
Examples
iex> MathematicalFunc.log1p([4, 5, 7, 8])
[1.61, 1.79, 2.07, 2.19]
Base-2 logarithm of x for all x in input array.
Examples
iex> MathematicalFunc.log2([2,4, 8])
[1.0, 2.0, 3.0]
Logarithm of the sum of exponentiations of the inputs.
Examples
iex> MathematicalFunc.logaddexp(5, 10)
10.006
Logarithm of the sum of exponentiations of the inputs in base-2.
Examples
iex> MathematicalFunc.logaddexp2(2, 3)
2.48
Round elements of the array to the nearest number.
Examples
iex> MathematicalFunc.rint([3.89, 4.70, 5.62])
[4, 5, 6]
Takes a list of elements and computes the sine function element wise .
##Examples
iex> MathematicalFunc.sin([1,2,34,4,5])
["0.84", "0.91", "0.53", "-0.76", "-0.96"]
Return the sinc function.
Examples
iex> MathematicalFunc.sinc([4, 6, -4, 5])
[-0.09, -0.03, -0.09, 0.06]
Takes a list of elements and computes the Hyperbolic sine function element wise .
Examples
iex>MathematicalFunc.sinh([1,2,34,4,5])
["1.18", "3.63", "291730871263727.43", "27.29", "74.20"]
Takes a list of elements and computes the tan function element wise .
Examples
iex> MathematicalFunc.tan([1, 90, 0, 45])
["1.56", "-2.19", "0.00", "1.62"]
Takes a list of elements and computes the tanh function element wise .
Examples
iex> MathematicalFunc.tanh([1, -1])
["0.76", "-0.76"]