bas7advr.hlp (Topic list)
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.
LOG Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
LOG returns the natural logarithm of a numeric expression.
 
LOG(numeric-expression)
    ■ The argument numeric-expression must be greater than zero.
 
Usage Notes
    ■ LOG is calculated in single precision if numeric-expression is an
      integer or single-precision value. If you use any other numeric data
      type, LOG is calculated in double-precision.
    ■ The natural logarithm is the logarithm to the base e. The constant
      e is approximately equal to 2.718282.
    ■ You can calculate base-10 logarithms by dividing the natural logarithm
      of the number by the natural logarithm of 10. The following FUNCTION
      procedure calculates base-10 logarithms:
 
         FUNCTION Log10(X) STATIC
            Log10=LOG(X)/LOG(10#)
         END FUNCTION