Math
module Math
Extended Modules
Defined in:
math/math.crConstant Summary
- E =
LibM.exp_f64(1.0)
- LOG10 =
LibM.log_f64(10.0)
- LOG2 =
LibM.log_f64(2.0)
- PI =
3.14159265358979323846
Instance Method Summary
- #acos(value : Float32)
Calculates the acos of value.
- #acos(value : Float64)
Calculates the acos of value.
- #acos(value)
Calculates the acos of value.
- #acosh(value : Float32)
Calculates the acosh of value.
- #acosh(value : Float64)
Calculates the acosh of value.
- #acosh(value)
Calculates the acosh of value.
- #asin(value : Float32)
Calculates the asin of value.
- #asin(value : Float64)
Calculates the asin of value.
- #asin(value)
Calculates the asin of value.
- #asinh(value)
Calculates the asinh of value.
- #asinh(value : Float64)
Calculates the asinh of value.
- #asinh(value : Float32)
Calculates the asinh of value.
- #atan(value : Float32)
Calculates the atan of value.
- #atan(value : Float64)
Calculates the atan of value.
- #atan(value)
Calculates the atan of value.
- #atan2(value1, value2)
Calculates atan2 with parameters value1 and value2.
- #atan2(value1 : Float64, value2 : Float64)
Calculates atan2 with parameters value1 and value2.
- #atan2(value1 : Float32, value2 : Float32)
Calculates atan2 with parameters value1 and value2.
- #atanh(value)
Calculates the atanh of value.
- #atanh(value : Float64)
Calculates the atanh of value.
- #atanh(value : Float32)
Calculates the atanh of value.
- #besselj(value1 : Int32, value2 : Float32)
Calculates besselj with parameters value1 and value2.
- #besselj(value1 : Int32, value2 : Float64)
Calculates besselj with parameters value1 and value2.
- #besselj(value1, value2)
Calculates besselj with parameters value1 and value2.
- #besselj0(value)
Calculates the besselj0 function of value.
- #besselj0(value : Float64)
Calculates the besselj0 function of value.
- #besselj0(value : Float32)
Calculates the besselj0 function of value.
- #besselj1(value : Float64)
Calculates the besselj1 function of value.
- #besselj1(value)
Calculates the besselj1 function of value.
- #besselj1(value : Float32)
Calculates the besselj1 function of value.
- #bessely(value1, value2)
Calculates bessely with parameters value1 and value2.
- #bessely(value1 : Int32, value2 : Float64)
Calculates bessely with parameters value1 and value2.
- #bessely(value1 : Int32, value2 : Float32)
Calculates bessely with parameters value1 and value2.
- #bessely0(value : Float32)
Calculates the bessely0 function of value.
- #bessely0(value)
Calculates the bessely0 function of value.
- #bessely0(value : Float64)
Calculates the bessely0 function of value.
- #bessely1(value : Float32)
Calculates the bessely1 function of value.
- #bessely1(value : Float64)
Calculates the bessely1 function of value.
- #bessely1(value)
Calculates the bessely1 function of value.
- #cbrt(value)
Calculates the cbrt of value.
- #cbrt(value : Float32)
Calculates the cbrt of value.
- #cbrt(value : Float64)
Calculates the cbrt of value.
- #copysign(value1 : Float32, value2 : Float32)
Calculates copysign with parameters value1 and value2.
- #copysign(value1 : Float64, value2 : Float64)
Calculates copysign with parameters value1 and value2.
- #copysign(value1, value2)
Calculates copysign with parameters value1 and value2.
- #cos(value)
Calculates the cos of value.
- #cos(value : Float32)
Calculates the cos of value.
- #cos(value : Float64)
Calculates the cos of value.
- #cosh(value)
Calculates the cosh of value.
- #cosh(value : Float32)
Calculates the cosh of value.
- #cosh(value : Float64)
Calculates the cosh of value.
- #erf(value : Float32)
Calculates the erf of value.
- #erf(value : Float64)
Calculates the erf of value.
- #erf(value)
Calculates the erf of value.
- #erfc(value : Float32)
Calculates the erfc of value.
- #erfc(value : Float64)
Calculates the erfc of value.
- #erfc(value)
Calculates the erfc of value.
- #exp(value : Float32)
Calculates the exp of value.
- #exp(value : Float64)
Calculates the exp of value.
- #exp(value)
Calculates the exp of value.
- #exp2(value : Float32)
Calculates the exp2 of value.
- #exp2(value : Float64)
Calculates the exp2 of value.
- #exp2(value)
Calculates the exp2 of value.
- #expm1(value : Float64)
Calculates the expm1 of value.
- #expm1(value : Float32)
Calculates the expm1 of value.
- #expm1(value)
Calculates the expm1 of value.
- #gamma(value : Float32)
Calculates the gamma function of value.
- #gamma(value)
Calculates the gamma function of value.
- #gamma(value : Float64)
Calculates the gamma function of value.
- #hypot(value1 : Float64, value2 : Float64)
Calculates hypot with parameters value1 and value2.
- #hypot(value1 : Float32, value2 : Float32)
Calculates hypot with parameters value1 and value2.
- #hypot(value1, value2)
Calculates hypot with parameters value1 and value2.
- #ilogb(value : Float32)
Calculates the ilogb of value.
- #ilogb(value : Float64)
Calculates the ilogb of value.
- #ilogb(value)
Calculates the ilogb of value.
- #ldexp(value1 : Float32, value2 : Int32)
Calculates ldexp with parameters value1 and value2.
- #ldexp(value1 : Float64, value2 : Int32)
Calculates ldexp with parameters value1 and value2.
- #ldexp(value1, value2)
Calculates ldexp with parameters value1 and value2.
- #lgamma(value : Float64)
Calculates the logarithmic gamma of value.
- #lgamma(value : Float32)
Calculates the logarithmic gamma of value.
- #lgamma(value)
Calculates the logarithmic gamma of value.
- #log(value)
Calculates the log of value.
- #log(value : Float32)
Calculates the log of value.
- #log(numeric, base)
Returns the logarithm of numeric to the base base.
- #log(value : Float64)
Calculates the log of value.
- #log10(value)
Calculates the log10 of value.
- #log10(value : Float64)
Calculates the log10 of value.
- #log10(value : Float32)
Calculates the log10 of value.
- #log1p(value)
Calculates the log1p of value.
- #log1p(value : Float64)
Calculates the log1p of value.
- #log1p(value : Float32)
Calculates the log1p of value.
- #log2(value)
Calculates the log2 of value.
- #log2(value : Float64)
Calculates the log2 of value.
- #log2(value : Float32)
Calculates the log2 of value.
- #logb(value : Float32)
Calculates the logb of value.
- #logb(value : Float64)
Calculates the logb of value.
- #logb(value)
Calculates the logb of value.
- #max(value1, value2)
Returns the greater of value1 and value2.
- #min(value1, value2)
Returns the smaller of value1 and value2.
- #pw2ceil(v)
Computes the next highest power of 2 of v.
- #scalbln(value, exp)
Multiplies value by 2 raised to power exp.
- #scalbln(value : Float64, exp : Int64)
Multiplies value by 2 raised to power exp.
- #scalbln(value : Float32, exp : Int64)
Multiplies value by 2 raised to power exp.
- #scalbn(value1, value2)
Calculates scalbn with parameters value1 and value2.
- #scalbn(value1 : Float64, value2 : Int32)
Calculates scalbn with parameters value1 and value2.
- #scalbn(value1 : Float32, value2 : Int32)
Calculates scalbn with parameters value1 and value2.
- #sin(value : Float32)
Calculates the sin of value.
- #sin(value : Float64)
Calculates the sin of value.
- #sin(value)
Calculates the sin of value.
- #sinh(value : Float32)
Calculates the sinh of value.
- #sinh(value : Float64)
Calculates the sinh of value.
- #sinh(value)
Calculates the sinh of value.
- #sqrt(value : Float32)
Calculates the sqrt of value.
- #sqrt(value : Float64)
Calculates the sqrt of value.
- #sqrt(value)
Calculates the sqrt of value.
- #tan(value : Float32)
Calculates the tan of value.
- #tan(value : Float64)
Calculates the tan of value.
- #tan(value)
Calculates the tan of value.
- #tanh(value : Float32)
Calculates the tanh of value.
- #tanh(value : Float64)
Calculates the tanh of value.
- #tanh(value)
Calculates the tanh of value.
Instance Method Detail
def acos(value)Source
Calculates the acos of value.
def acosh(value)Source
Calculates the acosh of value.
def asin(value)Source
Calculates the asin of value.
def asinh(value)Source
Calculates the asinh of value.
def atan(value)Source
Calculates the atan of value.
def atan2(value1, value2)Source
Calculates atan2 with parameters value1 and value2.
def atan2(value1 : Float64, value2 : Float64)Source
Calculates atan2 with parameters value1 and value2.
def atan2(value1 : Float32, value2 : Float32)Source
Calculates atan2 with parameters value1 and value2.
def atanh(value)Source
Calculates the atanh of value.
def besselj(value1 : Int32, value2 : Float32)Source
Calculates besselj with parameters value1 and value2.
def besselj(value1 : Int32, value2 : Float64)Source
Calculates besselj with parameters value1 and value2.
def besselj(value1, value2)Source
Calculates besselj with parameters value1 and value2.
def besselj0(value)Source
Calculates the besselj0 function of value.
def besselj1(value)Source
Calculates the besselj1 function of value.
def bessely(value1, value2)Source
Calculates bessely with parameters value1 and value2.
def bessely(value1 : Int32, value2 : Float64)Source
Calculates bessely with parameters value1 and value2.
def bessely(value1 : Int32, value2 : Float32)Source
Calculates bessely with parameters value1 and value2.
def bessely0(value)Source
Calculates the bessely0 function of value.
def bessely1(value)Source
Calculates the bessely1 function of value.
def cbrt(value)Source
Calculates the cbrt of value.
def copysign(value1 : Float32, value2 : Float32)Source
Calculates copysign with parameters value1 and value2.
def copysign(value1 : Float64, value2 : Float64)Source
Calculates copysign with parameters value1 and value2.
def copysign(value1, value2)Source
Calculates copysign with parameters value1 and value2.
def cos(value)Source
Calculates the cos of value.
def cosh(value)Source
Calculates the cosh of value.
def erf(value)Source
Calculates the erf of value.
def erfc(value)Source
Calculates the erfc of value.
def exp(value)Source
Calculates the exp of value.
def exp2(value)Source
Calculates the exp2 of value.
def expm1(value)Source
Calculates the expm1 of value.
def gamma(value)Source
def hypot(value1 : Float64, value2 : Float64)Source
Calculates hypot with parameters value1 and value2.
def hypot(value1 : Float32, value2 : Float32)Source
Calculates hypot with parameters value1 and value2.
def hypot(value1, value2)Source
Calculates hypot with parameters value1 and value2.
def ilogb(value)Source
Calculates the ilogb of value.
def ldexp(value1 : Float32, value2 : Int32)Source
Calculates ldexp with parameters value1 and value2.
def ldexp(value1 : Float64, value2 : Int32)Source
Calculates ldexp with parameters value1 and value2.
def ldexp(value1, value2)Source
Calculates ldexp with parameters value1 and value2.
def lgamma(value : Float64)Source
Calculates the logarithmic gamma of value.
Math.lgamma(2.96)
is the same as
Math.log(Math.gamma(2.96).abs)
def lgamma(value : Float32)Source
Calculates the logarithmic gamma of value.
Math.lgamma(2.96)
is the same as
Math.log(Math.gamma(2.96).abs)
def lgamma(value)Source
Calculates the logarithmic gamma of value.
Math.lgamma(2.96)
is the same as
Math.log(Math.gamma(2.96).abs)
def log(value)Source
Calculates the log of value.
def log(numeric, base)Source
Returns the logarithm of numeric to the base base.
def log10(value)Source
Calculates the log10 of value.
def log1p(value)Source
Calculates the log1p of value.
def log2(value)Source
Calculates the log2 of value.
def logb(value)Source
Calculates the logb of value.
def max(value1, value2)Source
Returns the greater of value1 and value2.
def min(value1, value2)Source
Returns the smaller of value1 and value2.
def pw2ceil(v)Source
Computes the next highest power of 2 of v.
Math.pw2ceil(33) # => 64
def scalbln(value, exp)Source
Multiplies value by 2 raised to power exp.
def scalbn(value1, value2)Source
Calculates scalbn with parameters value1 and value2.
def scalbn(value1 : Float64, value2 : Int32)Source
Calculates scalbn with parameters value1 and value2.
def scalbn(value1 : Float32, value2 : Int32)Source
Calculates scalbn with parameters value1 and value2.
def sin(value)Source
Calculates the sin of value.
def sinh(value)Source
Calculates the sinh of value.
def sqrt(value)Source
Calculates the sqrt of value.
def tan(value)Source
Calculates the tan of value.
def tanh(value)Source
Calculates the tanh of value.
© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/Math.html