this repo has no description
1.\" Copyright (c) 1985, 1991 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91
33.\" $Id: exp.3,v 1.4 2004/12/20 21:35:45 scp Exp $
34.\"
35.Dd December 11, 2006
36.Dt EXP 3
37.Os BSD 4
38.Sh NAME
39.Nm exp ,
40.Nm exp2 ,
41.Nm expm1
42.Nd exponential functions
43.Sh SYNOPSIS
44.Fd #include <math.h>
45.Ft double
46.Fn exp "double x"
47.Ft long double
48.Fn expl "long double x"
49.Ft float
50.Fn expf "float x"
51.Ft double
52.Fn exp2 "double x"
53.Ft long double
54.Fn exp2l "long double x"
55.Ft float
56.Fn exp2f "float x"
57.Ft double
58.Fn expm1 "double x"
59.Ft long double
60.Fn expm1l "long double x"
61.Ft float
62.Fn expm1f "float x"
63.Sh DESCRIPTION
64The
65.Fn exp
66function computes e**x, the base-e exponential of
67.Fa x .
68.Pp
69The
70.Fn exp2
71function computes 2**x, the base-2 exponential of
72.Fa x .
73.Pp
74The
75.Fn expm1
76function computes the base-e exponential of
77.Fa x
78, minus 1 accurately even for very small values of
79.Fa x .
80.Sh SPECIAL VALUES
81.Fn exp "�0"
82and
83.Fn exp2 "�0"
84return 1.
85.Pp
86.Fn exp "-infinity"
87and
88.Fn exp2 "-infinity"
89return +0.
90.Pp
91.Fn exp "+infinity"
92and
93.Fn exp2 "+infinity"
94return +infinity.
95.Pp
96.Fn expm1 "�0"
97returns �0.
98.Pp
99.Fn expm1 "-infinity"
100returns -1.
101.Pp
102.Fn expm1 "+infinity"
103returns +infinity.
104.Pp
105For all these functions, a range error occurs if the magnitude of x is too large.
106.Sh SEE ALSO
107.Xr math 3
108.Sh STANDARDS
109The
110.Fn exp
111,
112.Fn exp2
113, and
114.Fn expm1
115functions conform to ISO/IEC 9899:1999(E).