Exported Functions | |
---|---|
base/2 | Formats an integer into a string in base N, or parses a string in base N into an integer. |
ceil/1 | Returns the next highest integer of a value. |
ceil/2 | Returns the next highest multiple of N. |
deg_to_rad/1 | Converts degrees to radians. |
fact/1 | Returns the factorial of the given integer. |
fib/1 | Returns the nth term in the Fibonacci squence
[1,1,2,3,5,8,13...] . |
fix/1 | Returns the next lowest integer to the given number. |
floor/1 | See fix/1 . |
gcf/2 | Computes the greatest common factor of two integers. |
lcm/2 | Computes the least common multiple of two integers. |
max/2 | Returns the greater of two values. |
min/2 | Returns the lesser of two values. |
rad_to_deg/1 | Converts radians to degrees. |
sgn/1 | Returns +1, 0, or -1, depending on the argument's sign. |
base(Base::integer(), Value::integer() | string()) -> string() | integer()
Formats an integer into a string in base N, or parses a string in base N into an integer. Throws an error if the given string is not a well-formed number in base N.
ceil(number()) -> integer()
Returns the next highest integer of a value.
Complements trunc
.
ceil(number(), number()) -> number()
Returns the next highest multiple of N.
deg_to_rad(number()) -> number()
Converts degrees to radians.
fact(integer()) -> integer()
Returns the factorial of the given integer.
fib(integer()) -> integer()
Returns the nth term in the Fibonacci squence
[1,1,2,3,5,8,13...]
fix(number()) -> integer()
Returns the next lowest integer to the given number.
floor(number()) -> integer()
Equivalent to fix(number())
.
gcf(integer(), integer()) -> integer()
Computes the greatest common factor of two integers. This code was borrowed from Scott Gasch (who borrowed it from Euclid) and translated into Erlang.
lcm(integer(), integer()) -> integer()
Computes the least common multiple of two integers.
max(term(), term()) -> term()
Returns the greater of two values.
min(term(), term()) -> term()
Returns the lesser of two values.
rad_to_deg(number()) -> number()
Converts radians to degrees.
sgn(number()) -> integer()
Returns +1, 0, or -1, depending on the argument's sign.