Previous Page
Next Page


Calculates the base-10 logarithm of a number

#include <math.h>
double log10 ( double x  );
float log10f ( float x  );         (C99)
long double log10l ( long double x  );         (C99)

The log10( ) functions calculate the common logarithm of their argument. The common logarithm is the logarithm to base 10. The common logarithm of a number x is defined only for positive values of x. If x is negative, a domain error occurs; if x is zero, a range error may occur.


See the example for log( ) in this chapter.

See Also

log( ), log1p( ), log2( ), exp( ), pow( )

Previous Page
Next Page