1exp(3)                     Library Functions Manual                     exp(3)
2
3
4

NAME

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

LIBRARY

9       Math library (libm, -lm)
10

SYNOPSIS

12       #include <math.h>
13
14       double exp(double x);
15       float expf(float x);
16       long double expl(long double x);
17
18   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
19
20       expf(), expl():
21           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
22               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
23               || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
24

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

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

STANDARDS

68       C11, POSIX.1-2008.
69

HISTORY

71       C99, POSIX.1-2001.
72
73       The variant returning double also conforms to SVr4, 4.3BSD, C89.
74

SEE ALSO

76       cbrt(3), cexp(3), exp10(3), exp2(3), expm1(3), sqrt(3)
77
78
79
80Linux man-pages 6.05              2023-07-20                            exp(3)
Impressum