Debian Codegraph @

upstream/debian-trixie/man3/exp2.3

raw
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 exp2 3 2024-05-02 "Linux man-pages 6.9.1"
18 .SH NAME
19 exp2, exp2f, exp2l \- base-2 exponential 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 exp2(double " x );
28 .BI "float exp2f(float " x );
29 .BI "long double exp2l(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 exp2 (),
38 .BR exp2f (),
39 .BR exp2l ():
40 .nf
41 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
42 .fi
43 .SH DESCRIPTION
44 These functions return the value of 2 raised to the power of
45 .IR x .
46 .SH RETURN VALUE
47 On success, these functions return the base-2 exponential value of
48 .IR x .
49 .P
50 For various special cases, including the handling of infinity and NaN,
51 as well as overflows and underflows, see
52 .BR exp (3).
53 .SH ERRORS
54 See
55 .BR math_error (7)
56 for information on how to determine whether an error has occurred
57 when calling these functions.
58 .P
59 For a discussion of the errors that can occur for these functions, see
60 .BR exp (3).
61 .SH ATTRIBUTES
62 For an explanation of the terms used in this section, see
63 .BR attributes (7).
64 .TS
65 allbox;
66 lbx lb lb
67 l l l.
68 Interface Attribute Value
69 T{
70 .na
71 .nh
72 .BR exp2 (),
73 .BR exp2f (),
74 .BR exp2l ()
75 T} Thread safety MT-Safe
76 .TE
77 .SH STANDARDS
78 C11, POSIX.1-2008.
79 .SH HISTORY
80 glibc 2.1.
81 C99, POSIX.1-2001.
82 .P
83 The variant returning
84 .I double
85 also conforms to
86 SVr4, 4.3BSD.
87 .SH SEE ALSO
88 .BR cbrt (3),
89 .BR cexp2 (3),
90 .BR exp (3),
91 .BR exp10 (3),
92 .BR sqrt (3)