Debian Codegraph @

upstream/debian-unstable/man3/exp2.3

raw
1 '\" t
2 .\" Copyright 1993, David Metcalfe <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH exp2 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 exp2, exp2f, exp2l \- base-2 exponential function
10 .SH LIBRARY
11 Math library
12 .RI ( libm ,\~ \-lm )
13 .SH SYNOPSIS
14 .nf
15 .B #include <math.h>
16 .P
17 .BI "double exp2(double " x );
18 .BI "float exp2f(float " x );
19 .BI "long double exp2l(long double " x );
20 .fi
21 .P
22 .RS -4
23 Feature Test Macro Requirements for glibc (see
24 .BR feature_test_macros (7)):
25 .RE
26 .P
27 .BR exp2 (),
28 .BR exp2f (),
29 .BR exp2l ():
30 .nf
31 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
32 .fi
33 .SH DESCRIPTION
34 These functions return the value of 2 raised to the power of
35 .IR x .
36 .SH RETURN VALUE
37 On success, these functions return the base-2 exponential value of
38 .IR x .
39 .P
40 For various special cases, including the handling of infinity and NaN,
41 as well as overflows and underflows, see
42 .BR exp (3).
43 .SH ERRORS
44 See
45 .BR math_error (7)
46 for information on how to determine whether an error has occurred
47 when calling these functions.
48 .P
49 For a discussion of the errors that can occur for these functions, see
50 .BR exp (3).
51 .SH ATTRIBUTES
52 For an explanation of the terms used in this section, see
53 .BR attributes (7).
54 .TS
55 allbox;
56 lbx lb lb
57 l l l.
58 Interface Attribute Value
59 T{
60 .na
61 .nh
62 .BR exp2 (),
63 .BR exp2f (),
64 .BR exp2l ()
65 T} Thread safety MT-Safe
66 .TE
67 .SH STANDARDS
68 C11, POSIX.1-2008.
69 .SH HISTORY
70 glibc 2.1.
71 C99, POSIX.1-2001.
72 .P
73 The variant returning
74 .I double
75 also conforms to
76 SVr4, 4.3BSD.
77 .SH SEE ALSO
78 .BR cbrt (3),
79 .BR cexp2 (3),
80 .BR exp (3),
81 .BR exp10 (3),
82 .BR sqrt (3)