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():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23

DESCRIPTION

25       These  functions return the value of e (the base of natural logarithms)
26       raised to the power of x.
27

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

57       For  an  explanation  of  the  terms  used   in   this   section,   see
58       attributes(7).
59
60       ┌──────────────────────┬───────────────┬─────────┐
61Interface             Attribute     Value   
62       ├──────────────────────┼───────────────┼─────────┤
63exp(), expf(), expl() │ Thread safety │ MT-Safe │
64       └──────────────────────┴───────────────┴─────────┘

CONFORMING TO

66       C99, POSIX.1-2001, POSIX.1-2008.
67
68       The variant returning double also conforms to SVr4, 4.3BSD, C89.
69

SEE ALSO

71       cbrt(3), cexp(3), exp10(3), exp2(3), expm1(3), sqrt(3)
72

COLOPHON

74       This  page  is  part of release 5.02 of the Linux man-pages project.  A
75       description of the project, information about reporting bugs,  and  the
76       latest     version     of     this    page,    can    be    found    at
77       https://www.kernel.org/doc/man-pages/.
78
79
80
81                                  2017-09-15                            EXP(3)
Impressum