Specifications

Section 8. Processing and Math Instructions
8-17
INT, FIX
Returns the integer portion of a number.
Syntax
x = INT (Number)
x = FIX (Number)
Remarks
The source can be any valid numeric expression. Both INT and FIX remove
the fractional part of source and return the resulting integer value.
If the numeric expression results in a Not-a-Number, INT and FIX return a
Not-a-Number (NAN).
The difference between INT and FIX is that if number is negative, INT
returns the first negative integer less than or equal to number, whereas FIX
returns the first negative integer greater than or equal to number. For example,
INT converts -8.4 to -9, and FIX converts -8.4 to -8.
INT and FIX Function Example
This example illustrates the use of INT and FIX.
Dim A, B, C, D 'Declare variables.
BeginProg
A = INT(-99.8) 'Returns -100
B = FIX(-99.8) 'Returns -99
C = INT(99.8) 'Returns 99
D = FIX(99.8) 'Returns 99
EndProg
LN (Number)
LOG (Number)
Returns the natural logarithm of a number. Ln and Log perform the same
function.
Syntax
x = LOG (Number)
x = LN (Number)
Remarks
The source can be any valid numeric expression that results in a value greater
than 0. The natural logarithm is the logarithm to the base e. The constant e is
approximately 2.718282.
You can calculate base-n logarithms for any number x by dividing the natural
logarithm of x by the natural logarithm of n as follows:
Logn(x) = Log(x) / Log(n)