Primitives |
Arguments |
Utilisation |
Primitives |
Parameters |
Usage |
sum |
a b: numbers to add |
Adds the two numbers a and b and returns the result |
|
|
Eg: sum 40 60 returns 100 |
difference |
a b: numbers |
Returns a-b. |
|
|
Eg: difference 100 20 returns 80 |
minus |
a : number |
Returns the negative of a. |
|
|
Eg: minus 5 returns -5. See the note at the end
of this table. |
product |
a b : numbers |
Returns the result of multiplying a by b. |
div, divise |
a b: numbers |
Returns the result of dividing a by b |
|
|
div 3 6 returns 0.5 |
quotient |
a b: numbers |
Returns quotient a by b |
|
|
quotient 15 6 returns 2 |
mod, modulo |
a b: whole numbers |
Returns the remainder after dividing a by b. |
round, rnd |
a: number |
Returns the nearest whole number to the number a. |
|
|
round 6.4 returns 6 |
integer |
a: number |
returns the integer part of the number.
integer 8.9 returns 8 |
|
|
integer 6.8 returns 6 |
power |
a b: numbers |
Returns a raised to the power of b. |
|
|
power 3 2 returns 9 |
sqrt , sqrt |
n : number |
returns the square root. |
log |
n : number |
Returns the logarithm of n |
exp |
n : number |
Returns the exponential of n |
log10 |
n : number |
Returns the decimal logarithm of n |
sin, sine |
a: number |
Returns the sine of a. (a is expressed in degrees) |
cos, cosine |
a: number |
Returns the cosine of a. (a is expressed in degrees) |
tan, tangent |
a: number |
Returns the tangent of a. (a is expressed in degrees) |
acos, arccosine |
a: number |
Returns the angle in range [0-180] which cosine is a. |
asin, arcsine |
a: number |
Returns the angle which sine is a. |
atan, arctangent |
a: number |
Returns the angle which tangent is a. |
pi |
aucun |
Returns the number (3.141592653589793) |
random, ran |
n: whole number |
Returns a random number between 0 and . |
absolute, abs |
n: nombre |
Returns the absolute value (its numerical value without regard to its sign) of a number. |