Next: Other Functions, Previous: Terms, Up: Built-Ins [Contents][Index]
The following arithemetic functions are available.
Returns the sum of Num1
and Num2
.
+ : (nat, nat) -> nat | (int, int) -> int | (num, num) -> num
Returns the difference of Num1
and Num2
.
- : (int, int) -> int | (num, num) -> num
-Num1
Returns the negation of Num
.
- : int -> int | num -> num
Returns the product of Num1
and Num2
.
* : (nat, nat) -> nat | (int, int) -> int | (num, num) -> num
Returns the integer division of Num1
and Num2
.
// : (nat, nat) -> nat | (int, int) -> int
Returns the division of Num1
and Num2
.
/ : (num, num) -> num
Returns the mod of Num1
and Num2
.
mod : (nat, int) -> nat | (int, int) -> int
Returns Num1
raised to the power Num2
.
** : (nat, nat) -> nat | (int, nat) -> int | (num, num) -> num
Returns the bitwise right shift of Int with respect to Nat.
>>: (int, nat) -> int
Returns the bitwise left shift of Int with respect to Nat.
<<: (int, nat) -> int
Returns the bitwise AND of Int1 and Int2.
/\: (int, int) -> int
Returns the bitwise OR of Int1 and Int2.
\/: (int, int) -> int
Returns the bitwise complement of Int.
\: (int) -> int
Returns the absolute value of Num.
abs: int -> nat | num -> num
Returns the square root of Num.
sqrt: num -> num
Returns the round of Num.
round: num -> int
Returns the floor of Num.
floor: num -> int
Returns the ceiling of Num.
ceiling: num -> int
Returns PI.
pi_: () -> num
Returns E.
e_: () -> num
Returns the sin of Num.
sin: num -> num
Returns the cos of Num.
cos: num -> num
Returns the tan of Num.
tan: num -> num
Returns the arcsin of Num.
asin: num -> num
Returns the arccos of Num.
acos: num -> num
Returns the arctan of Num.
atan: num -> num
Returns the atan2 of Y and X. This returns an angle in the range (-pi, pi]
.
atan2: (num,num) -> num
Next: Other Functions, Previous: Terms, Up: Built-Ins [Contents][Index]