Name
log10
Synopsis
Calculates the base-10 logarithm of a number
#include <math.h> doublelog10
( doublex
); floatlog10f
( floatx
); (C99) long doublelog10l
( long doublex
); (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.
Example
See the example for log()
in this
chapter.
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.