]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/exp2.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / exp2.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 exp2 3 (date) "Linux man-pages (unreleased)"
17 .SH NAME
18 exp2, exp2f, exp2l \- base-2 exponential 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 exp2(double " x );
27 .BI "float exp2f(float " x );
28 .BI "long double exp2l(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 exp2 (),
37 .BR exp2f (),
38 .BR exp2l ():
39 .nf
40 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
41 .fi
42 .SH DESCRIPTION
43 These functions return the value of 2 raised to the power of
44 .IR x .
45 .SH RETURN VALUE
46 On success, these functions return the base-2 exponential value of
47 .IR x .
48 .PP
49 For various special cases, including the handling of infinity and NaN,
50 as well as overflows and underflows, see
51 .BR exp (3).
52 .SH ERRORS
53 See
54 .BR math_error (7)
55 for information on how to determine whether an error has occurred
56 when calling these functions.
57 .PP
58 For a discussion of the errors that can occur for these functions, see
59 .BR exp (3).
60 .SH VERSIONS
61 These functions first appeared in glibc in version 2.1.
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 exp2 (),
74 .BR exp2f (),
75 .BR exp2l ()
76 T} Thread safety MT-Safe
77 .TE
78 .hy
79 .ad
80 .sp 1
81 .SH STANDARDS
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.
88 .SH SEE ALSO
89 .BR cbrt (3),
90 .BR cexp2 (3),
91 .BR exp (3),
92 .BR exp10 (3),
93 .BR sqrt (3)