Skip to main content Link Search Menu Expand Document (external link)

log10() : Base-10 Logarithm


On this page

Summary

Calculate the base-10 logarithm of a number.

Signature

log10(value)

Parameters

Parameter Type Required Description
value Number Yes The number (must be positive)

Returns

Type: Double

The base-10 logarithm of the value.


Examples

Basic Log10

<p>log₁₀() = </p>

Data:

doc.Params["model"] = new {
    value = 100
};

Output:

<p>log₁₀(100) = 2.000</p>

Calculate Magnitude

<p>Order of magnitude: 10^</p>

Data:

doc.Params["model"] = new {
    value = 45000
};

Output:

<p>Order of magnitude: 10^4</p>

Decibel Calculation

<p>dB: </p>

Data:

doc.Params["model"] = new {
    power = 100,
    reference = 1
};

Output:

<p>dB: 20.0</p>

Notes

  • Value must be positive (> 0)
  • Returns double-precision floating-point
  • Common in scientific and engineering calculations
  • For natural logarithm, use log()
  • log10(10) = 1, log10(100) = 2, log10(1000) = 3

See Also