Next: Other Functions, Previous: Terms, Up: Built-Ins [Contents][Index]
The following arithemetic functions are available.
Returns the sum of
Num1
andNum2
.
fun nat + nat -> nat, int + int -> int, num + num -> num
Returns the difference of
Num1
andNum2
.
fun int - int -> int, num - num -> num
-Num1
Returns the negative value of
Num
.
fun -(int) -> int, -(num) -> num
Returns the product of
Num1
andNum2
.
fun nat * nat -> nat, int * int -> int, num * num -> num
Returns the integer division of
Num1
andNum2
.
fun //(nat, nat) -> nat, //(int, int) -> int
Returns the division of
Num1
andNum2
.
fun num / num -> num
Returns the mod of
Num1
andNum2
.
fun int mod int -> int
Returns
Num1
raised to the powerNum2
.
fun nat ** nat -> nat, int ** int -> 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.
fun int << nat -> int
Returns the bitwise AND of Int1 and Int2.
fun int /\ int -> int
Returns the bitwise OR of Int1 and Int2.
fun int \/ int -> int
Returns the bitwise complement of Int.
fun \(int) -> int
Returns the absolute value of Num.
fun abs(int) -> nat, abs(num) -> num
Returns the square root of Num.
fun sqrt(num) -> num
Returns the nearest integer to Num.
fun round(num) -> int
Returns the greatest integer less than Num.
fun floor(num) -> int
Returns the smallest number greater than Num.
fun ceiling(num) -> int
Returns value 3.14159 for PI.
fun pi() -> num
Returns 2.71828 value for E.
fun e() -> num
Returns the sin of Num.
fun sin(num) -> num
Returns the cos of Num.
fun cos(num) -> num
Returns the tan of Num.
fun tan(num) -> num
Returns the arcsin of Num.
fun asin(num) -> num
Returns the arccos of Num.
fun acos(num) -> num
Returns the arctan of Num.
fun atan(num) -> num
Returns the atan2 of Y and X. This returns an angle in the range
(-pi, pi]
.
fun atan2(num,num) -> num
Next: Other Functions, Previous: Terms, Up: Built-Ins [Contents][Index]