1EXP(3)                     Linux Programmer's Manual                    EXP(3)
2
3
4

NAME

6       exp, expf, expl - base-e exponential function
7

SYNOPSIS

9       #include <math.h>
10
11       double exp(double x);
12       float expf(float x);
13       long double expl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       expf(), expl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
20       _ISOC99_SOURCE; or cc -std=c99
21

DESCRIPTION

23       The exp() function returns the value of e (the base  of  natural  loga‐
24       rithms) raised to the power of x.
25

RETURN VALUE

27       On success, these functions return the exponential value of x.
28
29       If x is a NaN, a NaN is returned.
30
31       If x is positive infinity, positive infinity is returned.
32
33       If x is negative infinity, +0 is returned.
34
35       If the result underflows, a range error occurs, and zero is returned.
36
37       If the result overflows, a range error occurs, and the functions return
38       +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.
39

ERRORS

41       See math_error(7) for information on how to determine whether an  error
42       has occurred when calling these functions.
43
44       The following errors can occur:
45
46       Range error, overflow
47              errno  is  set  to ERANGE.  An overflow floating-point exception
48              (FE_OVERFLOW) is raised.
49
50       Range error, underflow
51              errno is set to ERANGE.  An underflow  floating-point  exception
52              (FE_UNDERFLOW) is raised.
53

CONFORMING TO

55       C99, POSIX.1-2001.  The variant returning double also conforms to SVr4,
56       4.3BSD, C89.
57

SEE ALSO

59       cbrt(3), cexp(3), exp10(3), exp2(3), sqrt(3)
60

COLOPHON

62       This page is part of release 3.22 of the Linux  man-pages  project.   A
63       description  of  the project, and information about reporting bugs, can
64       be found at http://www.kernel.org/doc/man-pages/.
65
66
67
68                                  2008-08-05                            EXP(3)
Impressum