mint.math - Palamecia/mint GitHub Wiki
Module
load mint.math
This module provides a set of functions to compute common mathematical operations and transformations.
Constants
Functions
- abs
- acos
- acosh
- asin
- asinh
- atan
- atan2
- atanh
- cbrt
- ceil
- copysign
- cos
- cosh
- dim
- erf
- erfc
- exp
- exp2
- expm1
- floor
- fma
- frexp
- gamma
- hypot
- ilogb
- inf
- isinf
- isnan
- ldexp
- lgamma
- log
- log10
- log1p
- log2
- logb
- max
- min
- mod
- modf
- nan
- nearbyint
- nextafter
- nexttoward
- pow
- remainder
- remquo
- rint
- round
- scalbn
- signbit
- sin
- sinCos
- sinh
- sqrt
- tan
- tanh
- tgamma
- trunc
Descriptions
E
2.71828182845904523536028747135266249775724709369995957496696763
Value of the e constant.
Ln10
2.30258509299404568401799145468436420760110148862877297603332790
Value of the common logarithm of 2.
Ln2
0.693147180559945309417232121458176568075500134360255254120680009
Value of the binary logarithm of 2.
Log10E
1 / Ln10
Value of the common logarithm of e.
Log2E
1 / Ln2
Value of the binary logarithm of e.
Sqrt2
1.41421356237309504880168872420969807856967187537694807317667974
Value of the square root of 2.
SqrtE
1.64872127070012814684865078781416357165377610071014801157507931
Value of the square root of e.
Sqrtπ
1.77245385090551602729816748334114518279754945612238712821380779
Value of the square root of π.
Sqrtφ
1.27201964951406896425242246173749149171560804184009624861664038
Value of the square root of φ.
abs
def (x)
Compute absolute value of x
.
acos
def (x)
Compute the arc cosine of x
.
acosh
def (x)
Compute the area hyperbolic cosine of x
.
asin
def (x)
Compute the arc sine of x
.
asinh
def (x)
Compute the area hyperbolic sine of x
.
atan
def (x)
Compute the arc tangent of x
.
atan2
def (y, x)
Compute the arc tangent with two parameters x
and y
.
atanh
def (x)
Compute the area hyperbolic tangent of x
.
cbrt
def (x)
Compute cubic root of x
.
ceil
def (x)
Round up x
value.
copysign
def (x, y)
Copy y
's sign to x
's value.
cos
def (x)
Compute the cosine of x
.
cosh
def (x)
Compute the hyperbolic cosine of x
.
dim
def (x, y)
Returns the positive difference between x
and y
.
erf
def (x)
Compute error function of x
.
erfc
def (x)
Compute complementary error function of x
.
exp
def (x)
Compute the exponential function of x
.
exp2
def (x)
Compute binary exponential function of x
.
expm1
def (x)
Compute exponential minus one of x
.
floor
def (x)
Round down x
value.
fma
def (x, y, z)
Returns x*y+z
avoiding intermediate lost of precision.
frexp
def (x)
Get the significand and exponent of x
.
gamma
def (x)
Compute gamma function of x
.
hypot
def (x, y)
Compute hypotenuse as sqrt(x**2+y**2)
avoiding intermediate overfows.
ilogb
def (x)
Integer binary logarithm of x
.
inf
def (sign)
Generate positive or negative infinity depending on the sign of sign
.
isinf
def (x, sign)
Returns true
if x
is an infinity value; otherwise returns false
.
isnan
def (x)
Returns true
if x
is a NaN (Not-A-Number) value; otherwise returns false
.
ldexp
def (x, exp)
Generate the value from significand x
and exponent exp
.
lgamma
def (x)
Compute log-gamma function of x
.
log
def (x)
Compute the natural logarithm of x
.
log10
def (x)
Compute the common logarithm of x
.
log1p
def (x)
Compute logarithm plus one of x
.
log2
def (x)
Compute binary logarithm of x
.
logb
def (x)
Compute floating-point base logarithm of x
.
max
def (x, y)
Returns the larger of its arguments: either x
or y
.
min
def (x, y)
Returns the smaller of its arguments: either x
or y
.
mod
def (x, y)
Compute remainder of division of x
by y
.
modf
def (x)
Break x
into fractional and integral parts.
nan
def ()
Generate quiet NaN.
nearbyint
def (x)
Round x
to nearby integral value.
nextafter
def (x, y)
Returns the next representable value after x
in the direction of y
.
nexttoward
def (x, y)
Returns the next representable value after x
in the direction of y
.
pow
def (x, y)
Raise x
to power y
.
remainder
def (x, y)
Compute remainder (IEC 60559) of division of x
by y
.
remquo
def (x, y)
Compute remainder and quotient of division of x
by y
.
rint
def (x)
Round x
to integral value.
round
def (x)
Round x
to nearest.
scalbn
def (x, exp)
Scale significand x
using floating-point base exponent exp
.
signbit
def (x)
Returns true
if x
is a negative value; otherwise returns false
.
sin
def (x)
Compute the sine of x
.
sinCos
def (x)
Compute the sine and cosine of x
.
sinh
def (x)
Compute the hyperbolic sine of x
.
sqrt
def (x)
Computes the square root of x
.
tan
def (x)
Compute the tangent of x
.
tanh
def (x)
Compute the hyperbolic tangent of x
.
tgamma
def (x)
Compute gamma function of x
.
trunc
def (x)
Truncate x
value.
π
3.14159265358979323846264338327950288419716939937510582097494459
Value of the π constant.
φ
1.61803398874989484820458683436563811772030917980576286213544862
Value of the φ constant.