]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
b2de3fac MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
fea681da | 4 | .\" |
5fbde956 | 5 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
6 | .\" |
7 | .\" References consulted: | |
8 | .\" Linux libc source code | |
9 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
10 | .\" 386BSD man pages | |
11 | .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) | |
12 | .\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no> | |
13 | .\" Modified 2002-07-27 by Walter Harms | |
14 | .\" (walter.harms@informatik.uni-oldenburg.de) | |
15 | .\" | |
7bd6328f | 16 | .TH LOG10 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual" |
fea681da MK |
17 | .SH NAME |
18 | log10, log10f, log10l \- base-10 logarithmic function | |
6f258d4c AC |
19 | .SH LIBRARY |
20 | Math library | |
8fc3b2cf | 21 | .RI ( libm ", " \-lm ) |
fea681da MK |
22 | .SH SYNOPSIS |
23 | .nf | |
24 | .B #include <math.h> | |
68e4db0a | 25 | .PP |
fea681da | 26 | .BI "double log10(double " x ); |
fea681da | 27 | .BI "float log10f(float " x ); |
fea681da MK |
28 | .BI "long double log10l(long double " x ); |
29 | .fi | |
68e4db0a | 30 | .PP |
d39ad78f | 31 | .RS -4 |
b2de3fac MK |
32 | Feature Test Macro Requirements for glibc (see |
33 | .BR feature_test_macros (7)): | |
d39ad78f | 34 | .RE |
68e4db0a | 35 | .PP |
b2de3fac MK |
36 | .BR log10f (), |
37 | .BR log10l (): | |
9d2adbae | 38 | .nf |
5c10d2c5 | 39 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
9d2adbae MK |
40 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE |
41 | || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE | |
42 | .fi | |
fea681da | 43 | .SH DESCRIPTION |
5600f73a | 44 | These functions return the base 10 logarithm of |
022671eb | 45 | .IR x . |
b2de3fac MK |
46 | .SH RETURN VALUE |
47 | On success, these functions return the base 10 logarithm of | |
48 | .IR x . | |
847e0d88 | 49 | .PP |
b2de3fac MK |
50 | For special cases, including where |
51 | .I x | |
52 | is 0, 1, negative, infinity, or NaN, see | |
53 | .BR log (3). | |
fea681da | 54 | .SH ERRORS |
b2de3fac MK |
55 | See |
56 | .BR math_error (7) | |
57 | for information on how to determine whether an error has occurred | |
58 | when calling these functions. | |
847e0d88 | 59 | .PP |
b2de3fac MK |
60 | For a discussion of the errors that can occur for these functions, see |
61 | .BR log (3). | |
acbba9e3 MS |
62 | .SH ATTRIBUTES |
63 | For an explanation of the terms used in this section, see | |
64 | .BR attributes (7). | |
c466875e MK |
65 | .ad l |
66 | .nh | |
acbba9e3 MS |
67 | .TS |
68 | allbox; | |
c466875e | 69 | lbx lb lb |
acbba9e3 MS |
70 | l l l. |
71 | Interface Attribute Value | |
72 | T{ | |
73 | .BR log10 (), | |
74 | .BR log10f (), | |
75 | .BR log10l () | |
76 | T} Thread safety MT-Safe | |
77 | .TE | |
c466875e MK |
78 | .hy |
79 | .ad | |
80 | .sp 1 | |
3113c7f3 | 81 | .SH STANDARDS |
9a74e018 | 82 | C99, POSIX.1-2001, POSIX.1-2008. |
847e0d88 | 83 | .PP |
b2de3fac MK |
84 | The variant returning |
85 | .I double | |
86 | also conforms to | |
68e1685c | 87 | SVr4, 4.3BSD, C89. |
47297adb | 88 | .SH SEE ALSO |
fea681da | 89 | .BR cbrt (3), |
36268806 | 90 | .BR clog10 (3), |
0912b48d | 91 | .BR exp10 (3), |
be62f421 JE |
92 | .BR log (3), |
93 | .BR log2 (3), | |
fea681da | 94 | .BR sqrt (3) |