No distinction is made between integer or real numbers. All numbers are internally coded as double precision floating point reals.
number ( number op
number )
Operation between two numbers. op
is one of the operators below. These either return a number :
+ Addition | - Subtraction |
* Multiplication | / Division |
^ Power |
or return 1 (result is true) or 0 (result is false) :
> Larger Than | < Smaller Than |
>= Larger or Equal | <= Smaller or Equal |
= Equal | <> Not Equal |
number ( number and
number )
number ( number or
number )
number ( not
number )
Conjunction, Disjunction and Negation. Boolean operators consider all null values to be false and all non null values to be true. Result is either 1 or 0.
Excerpt |
---|
number abs ( number )
|
Returns absolute value of a number.
Excerpt |
---|
number acos ( number ) number asin ( number ) number atan ( number ) |
...
Return the arc trigonometric function of a number. Result is in radians.
Excerpt |
---|
number cos ( number ) |
...
Return the cosine of a number (angle in radians).
Excerpt |
---|
number exp ( number )
|
Returns the exponential of a number
Excerpt |
---|
number int ( number )
|
...
Returns integer part of a number (no rounding, e.g. int(1.999)=1.0 )
Excerpt |
---|
number intbits ( number,number ) number intbits ( number,number,number ) |
...
The number of bits available depends on the machine architecture and Metview's compilation options, but at the time of writing it should be either 32 or 64.
Excerpt |
---|
number log ( number ) |
...
Returns the natural logarithm of a number.
Excerpt |
---|
number log10 ( number ) |
...
Returns the logarithm base 10 of a number.
Excerpt |
---|
number max ( number,number,... ) number min ( number,number,... ) |
...
Returns maximum / minimum of the input values.
Excerpt |
---|
number mod ( number,number )
|
Returns the remainder of the division of the first value by the second. If the second number is larger than the first, it returns the integer part of the first number. Note that only the integer parts of the inputs are considered in the calculation, meaning that a second parameter of 0.5 would cause a division by zero.
Excerpt |
---|
number neg ( number )
|
...
Returns the negative of a number. The same as (- number).
Excerpt |
---|
number number ( date,string )
|
...
- yy gives 97
- yyyy gives 1997
- m or mm give 4
- d or dd give 1
- D or DDD give 91 (4th of April is the 91st day of the year).
- H or HH give 2
- M or MM give 3
- S or SS gives 4
Excerpt |
---|
number precision ( ) number precision ( number )
|
...
precision( 12 ) gives 1234.56789
precision( 6 ) gives 1234.57
precision( 4 ) gives 1235
precision( 2 ) gives 1.2e+03
Returns a randomly selected non-negative double-precision floating-point value. The return values are uniformly distributed between [0.0, 1.0). There is no need to `seed' this random function, as this is done automatically the first time it is called.
Excerpt |
---|
number round ( number,number ) |
...
round( v, 1 ) gives 1234.6
round( v, 3 ) gives 1234.568
round( v, -2 ) gives 1200
Excerpt |
---|
number sgn ( number ) |
Returns the sign of a number as a number : -1 for negative values, 1 for positive and 0 for null values.
Excerpt |
---|
number sin ( number ) |
Return the sine of a number (angle in radians).
Excerpt |
---|
number sqrt ( number ) |
Returns the square root of a number.
Excerpt |
---|
string string ( number ) |
Returns the string equivalent of a number.
Excerpt |
---|
number sum ( number,number,... ) |
Returns the sum of the input values.
Excerpt |
---|
number tan ( number )
|
...