LOG

From QB64 Wiki
Revision as of 19:57, 16 September 2009 by imported>Clippy (Created page with 'The '''LOG''' math function returns the natural logarithm of a specified numerical value. ''Syntax:'' logarithm = LOG(value) * Value parameter MUST be greater than 0! * Th…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The LOG math function returns the natural logarithm of a specified numerical value.


Syntax: logarithm = LOG(value)


  • Value parameter MUST be greater than 0!
  • The natural logarithm is the logarithm to the base e. e = 2.718282 approximately.
  • Returns are default SINGLE precision unless the value parameter uses DOUBLE precision.


Example: FUNCTION to find the base ten logarithm or a numerical value.


FUNCTION Log10(value)
Log10 = LOG(value) / LOG(10#)
END FUNCTION

Explanation: The natural logarithm of the value is divided by the base 10 logarithm. The LOG of ten is designated as a DOUBLE precision return by using # after the 10 value.


See also: EXP


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage