Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

log10, log10f, log10l - base 10 logarithm function

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double log10(double x);
C11
float log10f(float x);
long double log10l(long double x); (End)

Description

These functions compute the logarithm of the positive floating-point number x to the base 10.

Return val.

lg(x)

for a positive x.

 

-HUGE_VAL
-HUGE_VALF
-HUGE_VALL

depending on the function type, if x is less than or equal to 0.
errno is set to indicate the error.

Errors

log10(), log10f() and log10l() will fail if:

 

EDOM

The value of x is negative.

 

ERANGE

The value of x is 0.

See also

exp(), exp2()log()log2(), pow(), sqrt(), math.h.