Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
EXP, LOG Functions Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
EXP(numeric-expression)
LOG(numeric-expression)
Usage Notes
■ EXP and LOG are calculated in single precision if numeric-expression
is an integer or a single-precision value. If you use any other numeric
data type, EXP and LOG are calculated in double precision.
■ The valid range for EXP numeric expressions is <= 88.02969 (single-
precision) or <= 709.782712893 (double-precision). If numeric-expression
is outside the valid range, Visual Basic generates the run-time error
message, "Overflow."
■ The constant e is approximately equal to 2.718282.
■ The natural logarithm is the logarithm to the base e.
■ You can calculate base-n logarithms for any number x by dividing the
natural logarithm of x by the natural logarithm of n:
LOGn = LOG(x)/LOGn
For example, the following FUNCTION procedure calculates base-10
logarithms:
FUNCTION LOG10(X) STATIC
LOG10 = LOG(X)/LOG(10)
END FUNCTION
See: ◄FUNCTION Statement►