]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/log10.3
4d244c1dc5f789666409b83f866f1880183d5f08
[thirdparty/man-pages.git] / man3 / log10.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
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 .\"
16 .TH LOG10 3 2021-03-22 "" "Linux Programmer's Manual"
17 .SH NAME
18 log10, log10f, log10l \- base-10 logarithmic function
19 .SH LIBRARY
20 Math library
21 .RI ( libm ", " \-lm )
22 .SH SYNOPSIS
23 .nf
24 .B #include <math.h>
25 .PP
26 .BI "double log10(double " x );
27 .BI "float log10f(float " x );
28 .BI "long double log10l(long double " x );
29 .fi
30 .PP
31 .RS -4
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
34 .RE
35 .PP
36 .BR log10f (),
37 .BR log10l ():
38 .nf
39 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
40 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 .fi
43 .SH DESCRIPTION
44 These functions return the base 10 logarithm of
45 .IR x .
46 .SH RETURN VALUE
47 On success, these functions return the base 10 logarithm of
48 .IR x .
49 .PP
50 For special cases, including where
51 .I x
52 is 0, 1, negative, infinity, or NaN, see
53 .BR log (3).
54 .SH ERRORS
55 See
56 .BR math_error (7)
57 for information on how to determine whether an error has occurred
58 when calling these functions.
59 .PP
60 For a discussion of the errors that can occur for these functions, see
61 .BR log (3).
62 .SH ATTRIBUTES
63 For an explanation of the terms used in this section, see
64 .BR attributes (7).
65 .ad l
66 .nh
67 .TS
68 allbox;
69 lbx lb lb
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
78 .hy
79 .ad
80 .sp 1
81 .SH CONFORMING TO
82 C99, POSIX.1-2001, POSIX.1-2008.
83 .PP
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)