| 1 |
'\" t |
| 2 |
.\" Copyright 1993 David Metcalfe ([email protected]) |
| 3 |
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
| 4 |
.\" <[email protected]> |
| 5 |
.\" |
| 6 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 7 |
.\" |
| 8 |
.\" References consulted: |
| 9 |
.\" Linux libc source code |
| 10 |
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) |
| 11 |
.\" 386BSD man pages |
| 12 |
.\" Modified 1993-07-24 by Rik Faith ([email protected]) |
| 13 |
.\" Modified 1995-08-14 by Arnt Gulbrandsen <[email protected]> |
| 14 |
.\" Modified 2002-07-27 by Walter Harms |
| 15 |
.\" ([email protected]) |
| 16 |
.\" |
| 17 |
.TH log10 3 2024-05-02 "Linux man-pages 6.9.1" |
| 18 |
.SH NAME |
| 19 |
log10, log10f, log10l \- base-10 logarithmic function |
| 20 |
.SH LIBRARY |
| 21 |
Math library |
| 22 |
.RI ( libm ", " \-lm ) |
| 23 |
.SH SYNOPSIS |
| 24 |
.nf |
| 25 |
.B #include <math.h> |
| 26 |
.P |
| 27 |
.BI "double log10(double " x ); |
| 28 |
.BI "float log10f(float " x ); |
| 29 |
.BI "long double log10l(long double " x ); |
| 30 |
.fi |
| 31 |
.P |
| 32 |
.RS -4 |
| 33 |
Feature Test Macro Requirements for glibc (see |
| 34 |
.BR feature_test_macros (7)): |
| 35 |
.RE |
| 36 |
.P |
| 37 |
.BR log10f (), |
| 38 |
.BR log10l (): |
| 39 |
.nf |
| 40 |
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
| 41 |
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE |
| 42 |
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE |
| 43 |
.fi |
| 44 |
.SH DESCRIPTION |
| 45 |
These functions return the base-10 logarithm of |
| 46 |
.IR x . |
| 47 |
.SH RETURN VALUE |
| 48 |
On success, these functions return the base-10 logarithm of |
| 49 |
.IR x . |
| 50 |
.P |
| 51 |
For special cases, including where |
| 52 |
.I x |
| 53 |
is 0, 1, negative, infinity, or NaN, see |
| 54 |
.BR log (3). |
| 55 |
.SH ERRORS |
| 56 |
See |
| 57 |
.BR math_error (7) |
| 58 |
for information on how to determine whether an error has occurred |
| 59 |
when calling these functions. |
| 60 |
.P |
| 61 |
For a discussion of the errors that can occur for these functions, see |
| 62 |
.BR log (3). |
| 63 |
.SH ATTRIBUTES |
| 64 |
For an explanation of the terms used in this section, see |
| 65 |
.BR attributes (7). |
| 66 |
.TS |
| 67 |
allbox; |
| 68 |
lbx lb lb |
| 69 |
l l l. |
| 70 |
Interface Attribute Value |
| 71 |
T{ |
| 72 |
.na |
| 73 |
.nh |
| 74 |
.BR log10 (), |
| 75 |
.BR log10f (), |
| 76 |
.BR log10l () |
| 77 |
T} Thread safety MT-Safe |
| 78 |
.TE |
| 79 |
.SH STANDARDS |
| 80 |
C11, POSIX.1-2008. |
| 81 |
.SH HISTORY |
| 82 |
C99, POSIX.1-2001. |
| 83 |
.P |
| 84 |
The variant returning |
| 85 |
.I double |
| 86 |
also conforms to |
| 87 |
SVr4, 4.3BSD, C89. |
| 88 |
.SH SEE ALSO |
| 89 |
.BR cbrt (3), |
| 90 |
.BR clog10 (3), |
| 91 |
.BR exp10 (3), |
| 92 |
.BR log (3), |
| 93 |
.BR log2 (3), |
| 94 |
.BR sqrt (3) |