Returns the natural logarithm of the argument, that is, log
(argument ). This
is the inverse of the EXP function, so X=LOG(EXP (X)). To find the logarithm of a number to another base b,
use the formula log
(X) = log
(b). For example, LOG(32767)/LOG(2) returns the logarithm to base 2
is actually a complete statement rather than a function. It reseeds the random number generator. If a program
uses the RND function, you may want to put RANDOM at the beginning of the program. This will ensure that
you get an unpredictable sequence of pseudo-random numbers each time you run the program.
Generates a pseudo-random number using the current pseudo-random "seed number" (generated internally
and not accessible to user). RND may be used to produce random numbers between 0 and 1, or random
integers greater than 0, depending on the argument.
RND(0) returns a single-precision float value between 0 and 1.
RND(integer) returns an integer between 1 and integer inclusive . For example, RND(55) returns a
pseudo-random integer greater than zero and less than 56.
The "sign" function: returns -1 for X negative, 0 for X zero, and +l for X positive.
Returns the sine of the argument (argument must be in radians). To obtain the sine of X when X is in degrees,
Returns the square root of the argument. SQR(X) is the same as X^(1/2), only faster.
Returns the tangent of the argument (argument must be in radians). To obtain the tangent of X when X is in
degrees, use TAN(X*.01745329).
Returns the line number in which an error has occurred. This function is primarily used inside an
error-handling routine accessed by an ON ERROR GOTO statement. If no error has occurred when ERL is
called, line number 0 is returned. However, if an error has occurred since power-up, ERL returns the line
number in which the error occurred.