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

Link to this function acos(list) View Source
acos([number()]) :: [charlist()]

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"]
Link to this function acosh(list) View Source
acosh([number()]) :: [charlist()]

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"]
Link to this function add(list) View Source
add([number()]) :: number()

Add arguments element-wise.

Examples

iex> MathematicalFunc.add([4, 6, 8190])
8200
Link to this function asin(list) View Source
asin([number()]) :: [charlist()]

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"]
Link to this function asinh(list) View Source
asinh([number()]) :: [charlist()]

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"]
Link to this function atan(list) View Source
atan([number()]) :: [charlist()]

Takes a list of elements and computes the atan function element wise .

Examples

iex> MathematicalFunc.atan([1,45])
["0.79", "1.55"]
Link to this function atanh(list) View Source
atanh([number()]) :: [charlist()]

Takes a list of elements and computes the atanh function element wise .

Examples

iex> MathematicalFunc.atanh([0.8, 0.9])
["1.10", "1.47"]
Link to this function ceil(list) View Source
ceil([number()]) :: [number()]

Return the ceiling of the input, element-wise.

Examples

iex> MathematicalFunc.ceil([3.89, 4.70, 5.62])
[4.0, 5.0, 6.0]
Link to this function cos(list) View Source
cos([number()]) :: [charlist()]

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"]
Link to this function cosh(list) View Source
cosh([number()]) :: [charlist()]

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"]
Link to this function deg2rad(degree) View Source
deg2rad(number()) :: number()

Convets the angle value in degrees to radians .

Examples

iex> MathematicalFunc.deg2rad(180)
3.14159
Link to this function exmp(list) View Source
exmp([number()]) :: [number()]

Calculate exp(x) - 1 for all elements in the array.

Examples

iex> MathematicalFunc.exmp([2, 3, 5])
[6.38, 19.08, 147.41]
Link to this function exp(list) View Source
exp([number()]) :: [number()]

Calculate the exponential of all elements in the input array.

Examples

iex> MathematicalFunc.exp([2,3,5])
[7.38, 20.08, 148.41]
Link to this function exp2(list) View Source
exp2([number()]) :: [number()]

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]
Link to this function floor(list) View Source
floor([number()]) :: [number()]

Return the floor of the input, element-wise.

Examples

iex> MathematicalFunc.floor([3.89, 4.70, 5.62])
[3.0, 4.0, 5.0]
Link to this function hypot(s1, s2) View Source
hypot(number(), number()) :: number()

Takes the values of two sides of a right angled triangle and gives the hypotenuse .

Examples

iex> MathematicalFunc.hypot(3, 4)
5.0
Link to this function log(list) View Source
log([number()]) :: [number()]

Natural logarithm, element-wise.

Examples

iex> MathematicalFunc.log([3, 4, 5, 8])
[0.47, 0.60, 0.69, 0.90]
Link to this function log10(list) View Source
log10([number()]) :: [number()]

Return the base 10 logarithm of the input array, element-wise.

Examples

iex> MathematicalFunc.log10([10, 100, 1000])
[1.0, 2.0, 3.0]
Link to this function log1p(list) View Source
log1p([number()]) :: [number()]

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]
Link to this function log2(list) View Source
log2([number()]) :: [number()]

Base-2 logarithm of x for all x in input array.

Examples

iex> MathematicalFunc.log2([2,4, 8])
[1.0, 2.0, 3.0]
Link to this function logaddexp(x1, x2) View Source
logaddexp(number(), number()) :: number()

Logarithm of the sum of exponentiations of the inputs.

Examples

iex> MathematicalFunc.logaddexp(5, 10)
10.006
Link to this function logaddexp2(x1, x2) View Source
logaddexp2(number(), number()) :: number()

Logarithm of the sum of exponentiations of the inputs in base-2.

Examples

iex> MathematicalFunc.logaddexp2(2, 3)
2.48
Link to this function rad2deg(radian) View Source
rad2deg(number()) :: number()

Convets the angle value in radians to degrees.

Examples

iex> MathematicalFunc.rad2deg(3.14159)
180
Link to this function rint(list) View Source
rint([number()]) :: [number()]

Round elements of the array to the nearest number.

Examples

iex> MathematicalFunc.rint([3.89, 4.70, 5.62])
[4, 5, 6]
Link to this function sin(list) View Source
sin([number()]) :: [charlist()]

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"]
Link to this function sinc(list) View Source
sinc([number()]) :: [number()]

Return the sinc function.

Examples

iex> MathematicalFunc.sinc([4, 6, -4, 5])
[-0.09, -0.03, -0.09, 0.06]
Link to this function sinh(list) View Source
sinh([number()]) :: [charlist()]

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"]
Link to this function tan(list) View Source
tan([number()]) :: [charlist()]

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"]
Link to this function tanh(list) View Source
tanh([number()]) :: [charlist()]

Takes a list of elements and computes the tanh function element wise .

Examples

iex> MathematicalFunc.tanh([1, -1])
["0.76", "-0.76"]
Link to this function truncate(list) View Source
truncate([number()]) :: [number()]

Return the truncated value of the input, element-wise.

Examples

iex> MathematicalFunc.truncate([3.89, 4.70, 5.62])
[3, 4, 5]