Specifications

Section 8. Processing and Math Instructions
8-18
The following example illustrates a procedure that calculates base-10
logarithms:
Log10 = Log(X) / Log(10)
Log Function Example
The example calculates the value of e, then uses the Log function to calculate
the natural logarithm of e to the first, second, and third powers.
Dim I, M 'Declare variables.
BeginProg
M = Exp(1)
For I = 1 To 3 'Do three times.
M =Log(Exp(1) ^ I)
Next I
EndProg
LOG10 (number)
The LOG10 function returns the base 10 logarithm of a number.
Syntax
x = LOG10 (number)
Remarks
The LOG10 function returns the logarithm base 10 of a number.
The number argument can be any valid numeric expression that has a value
greater than 0. You can calculate base-n logarithms for any number x by
dividing the logarithm base 10 of x by the logarithm base 10 of n as follows:
LOGN( x ) = LOG10( x ) / LOG10( n )
LOG10 Function Example
This example uses the LOG10 instruction to calculate the log base 2 of 1000.
Dim LOG2_1000 'Declare variables.
BeginProg
LOG2_1000 = LOG10(1000)/LOG10(2)
EndProg
MaxSpa (Dest, Swath, Source)
Finds the maximum value in an array.
Syntax
MaxSpa(Dest, Swath, Source)