Log10

Syntax:

    returned_word_variable = Log10 (word_value)

Command Availability:

Available on all microcontrollers.

Explanation:

The Log10 command returns the base-10 logarithm, to 2 decimal places.

The values returned are fixed-point numbers, with two decimal places assumed on the right — or, if you prefer, think of the values as being scaled up by 100.

Example:

    dim log_value as word
    log_value = log10 ( 10 )      ' <<< the Log10 instruction -- returns 230, equating to 2.30

Key line: log10 ( 10 ) — returns 230, representing 2.30, the base-10 logarithm of 10. Supported in <MATHS.H>

See Also:

  • Logarithms — overview of the log family of functions
  • Log2 — base-2 logarithm
  • Loge — natural (base-e) logarithm