num Module
+
num1 num2 ⇒ num3
Sums num1 and num2.
-
num1 num2 ⇒ num3
Subtracts num2 from num1.
-inf
∅ ⇒ num
Returns negative infinity.
*
num1 num2 ⇒ num3
Multiplies num1 by num2.
/
num1 num2 ⇒ num3
Divides num1 by num2.
avg
quot ⇒ num
Returns the average of the items of quot.
base
"dec"|"hex"|"oct"|"bin" ⇒ ∅
Sets the numeric base used to represent integers.
base?
∅ ⇒ "dec"|"hex"|"oct"|"bin"
Returns the numeric base currently used to represent integers (default: "dec").
bitand
int1 int2 ⇒ int3
Computes the bitwise and of integer int1 and int2.
bitclear
int1 quot ⇒ int2
Sets the bytes specified via their position in int1 through quot to 0.
bitflip
int1 quot ⇒ int2
Flips the bytes specified via their position in int1 through quot.
bitnot
int1 ⇒ int2
Computes the bitwise complement of int1.
bitor
int1 int2 ⇒ int3
Computes the bitwise or of integers int1 and int2.
bitparity
int1 ⇒ int2
Calculate the bit parity in int1. If the number of 1-bits is odd, the parity is 1, otherwise 0.
bitset
int1 quot ⇒ int2
Sets the bytes specified via their position in int1 through quot to 0.
bitxor
int1 int2 ⇒ int3
Computes the bitwise xor of integers int1 and int2.
even?
int ⇒ bool
Returns true if int is even, false otherwise.
div
int1 int2 ⇒ int3
Divides int1 by int2 (integer division).
inf
∅ ⇒ num
Returns infinity.
med
quot ⇒ num
Returns the median of the items of quot.
mod
int1 int2 ⇒ int3
Returns the integer module of int1 divided by int2.
nan
∅ ⇒ nan
Returns NaN (not a number).
odd?
int ⇒ bool
Returns true if int is odd, false otherwise.
pred
int1 ⇒ int2
Returns the predecessor of int1.
product
quot ⇒ int
Returns the product of all items of quot. quot is a quotation of integers.
random
int1 ⇒ int2
Returns a random number int2 between 0 and int1-1.
Note
You must call randomize to initialize the random number generator, otherwise the same sequence of numbers will be returned.
randomize
∅ ⇒ {{null}
Initializes the random number generator using a seed based on the current timestamp.
range
quot2 ⇒ quot2
Takes a quotation quot1 of two or three integers in the form of start, end and an optional step (1 if not specified) and generates the sequence and returns the resulting quotation of integers quot2.
shl
int1 int2 ⇒ int3
Computes the shift left operation of int1 and int2.
shr
int1 int2 ⇒ int3
Computes the shift right operation of int1 and int2.
succ
int1 ⇒ int2
Returns the successor of int1.
sum
quot ⇒ int
Returns the sum of all items of quot. quot is a quotation of integers.