Math
*
Multiplication of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
+
Addition of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
-
Subtraction of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
/
Division of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
abs
Absolute value.
Type:
('a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)
acos
Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
asin
Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
atan
Arc tangent. Result is in radians and is between -pi/2 and pi/2.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
bool_of_float
Convert a float to a bool.
Type:
(float) -> bool
Arguments:
(unlabeled)(of typefloat)
bool_of_int
Convert an int to a bool.
Type:
(int) -> bool
Arguments:
(unlabeled)(of typeint)
cos
Cosine. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
cosh
Hyperbolic cosine. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
dB_of_lin
Convert linear scale into decibels.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
exp
Exponential.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
float
Convert a number to a float.
Type:
('a) -> float where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)
float_of_int
Convert an int to a float.
Type:
(int) -> float
Arguments:
(unlabeled)(of typeint)
infinity
Float representation of infinity.
Type:
float
int
Convert a number to an integer.
Type:
('a) -> int where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)
int_of_float
Convert a float to a int.
Type:
(float) -> int
Arguments:
(unlabeled)(of typefloat)
lin_of_dB
Convert decibels into linear scale.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
ln
Natural logarithm.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
log10
Base 10 logarithm.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
lsl
Logical shift left.
Type:
(int, int) -> int
Arguments:
(unlabeled)(of typeint): Number to shift.(unlabeled)(of typeint): Number of bits to shift.
lsr
Logical shift right.
Type:
(int, int) -> int
Arguments:
(unlabeled)(of typeint): Number to shift.(unlabeled)(of typeint): Number of bits to shift.
max
Compute the maximum of two values.
Type:
('a, 'a) -> 'a where 'a is an orderable type
Arguments:
(unlabeled)(of typeanything that is an orderable type)(unlabeled)(of typeanything that is an orderable type)
max_int
Maximal representable integer.
Type:
int
min
Compute the minimum of two values.
Type:
('a, 'a) -> 'a where 'a is an orderable type
Arguments:
(unlabeled)(of typeanything that is an orderable type)(unlabeled)(of typeanything that is an orderable type)
min_int
Minimal representable integer.
Type:
int
mod
Remainder of division of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
nan
A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result. As for floating-point comparisons, ==, <, <=, > and >= return false and != returns true if one or both of their arguments is nan.
Type:
float
pow
Exponentiation of numbers.
Type:
('a, 'a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)(unlabeled)(of typeanything that is a number type)
random.float
Generate a random value between min (included) and max (excluded).
Type:
(?min : float, ?max : float) -> float
Arguments:
min(of typefloat, which defaults to0.)max(of typefloat, which defaults to1.)
random.int
Generate a random value between min (included) and max (excluded).
Type:
(?min : int, ?max : int) -> int
Arguments:
min(of typeint, which defaults to-536870911)max(of typeint, which defaults to536870912)
sin
Sine. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
sinh
Hyperbolic sine. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
sqrt
Square root.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
tan
Tangent. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
tanh
Hyperbolic tangent. Argument is in radians.
Type:
(float) -> float
Arguments:
(unlabeled)(of typefloat)
~-
Returns the opposite of its argument.
Type:
('a) -> 'a where 'a is a number type
Arguments:
(unlabeled)(of typeanything that is a number type)