log10


Logarithmic function (base = 10)

[Classification]

Mathematical library

[Syntax]

#include <math.h>

double log10(double x);

[Return value]

Returns the logarithm of x with base 10.

log10f returns a NaN and sets macro EDOM to global variable errno if x is negative. If x is zero, it returns -∞ and sets macro ERANGE to global variable errno.

[Description]

This function calculates the logarithm of x with base 10. This is realized by "log (x) / log (10)".