1exp2(3) Library Functions Manual exp2(3)
2
3
4
6 exp2, exp2f, exp2l - base-2 exponential function
7
9 Math library (libm, -lm)
10
12 #include <math.h>
13
14 double exp2(double x);
15 float exp2f(float x);
16 long double exp2l(long double x);
17
18 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
19
20 exp2(), exp2f(), exp2l():
21 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
22
24 These functions return the value of 2 raised to the power of x.
25
27 On success, these functions return the base-2 exponential value of x.
28
29 For various special cases, including the handling of infinity and NaN,
30 as well as overflows and underflows, see exp(3).
31
33 See math_error(7) for information on how to determine whether an error
34 has occurred when calling these functions.
35
36 For a discussion of the errors that can occur for these functions, see
37 exp(3).
38
40 For an explanation of the terms used in this section, see at‐
41 tributes(7).
42
43 ┌────────────────────────────────────────────┬───────────────┬─────────┐
44 │Interface │ Attribute │ Value │
45 ├────────────────────────────────────────────┼───────────────┼─────────┤
46 │exp2(), exp2f(), exp2l() │ Thread safety │ MT-Safe │
47 └────────────────────────────────────────────┴───────────────┴─────────┘
48
50 C11, POSIX.1-2008.
51
53 glibc 2.1. C99, POSIX.1-2001.
54
55 The variant returning double also conforms to SVr4, 4.3BSD.
56
58 cbrt(3), cexp2(3), exp(3), exp10(3), sqrt(3)
59
60
61
62Linux man-pages 6.05 2023-07-20 exp2(3)