log10 function
The log10 function returns the logarithmic value with base 10 for the specified expression.
Syntax:
double log10(n)Semantics:
- n: The argument n is an expression that resolves to a number.
- return type: double.
- Returns a NULL value in the following cases:
- n resolves to a NULL value
- n does not resolve to a number
- Returns NaN in the following cases:
- n resolves to NaN
- n is less than zero
- Returns positive infinity if n resolves to positive infinity.
- Returns negative infinity if n is positive/negative zero.
- Returns n if the value of n is equal to 10n, where n is an integer.
- Returns a NULL value in the following cases:
Example:
SELECT log10(n) FROM PHtable| Value of n | Output |
|---|---|
| 1 | 0.0 |
| 10 | 1.0 |
| 1.0E-7 | -7.0 |