]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/exp.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / exp.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _exp:
7
8 .. index:: EXP
9
10 .. index:: DEXP
11
12 .. index:: CEXP
13
14 .. index:: ZEXP
15
16 .. index:: CDEXP
17
18 .. index:: exponential function
19
20 .. index:: logarithm function, inverse
21
22 EXP --- Exponential function
23 *****************************
24
25 .. function:: EXP(X)
26
27 ``EXP(X)`` computes the base e exponential of :samp:`{X}`.
28
29 :param X:
30 The type shall be ``REAL`` or
31 ``COMPLEX``.
32
33 :return:
34 The return value has same type and kind as :samp:`{X}`.
35
36 Standard:
37 Fortran 77 and later, has overloads that are GNU extensions
38
39 Class:
40 Elemental function
41
42 Syntax:
43 .. code-block:: fortran
44
45 RESULT = EXP(X)
46
47 Example:
48 .. code-block:: fortran
49
50 program test_exp
51 real :: x = 1.0
52 x = exp(x)
53 end program test_exp
54
55 Specific names:
56 .. list-table::
57 :header-rows: 1
58
59 * - Name
60 - Argument
61 - Return type
62 - Standard
63
64 * - ``EXP(X)``
65 - ``REAL(4) X``
66 - ``REAL(4)``
67 - Fortran 77 and later
68 * - ``DEXP(X)``
69 - ``REAL(8) X``
70 - ``REAL(8)``
71 - Fortran 77 and later
72 * - ``CEXP(X)``
73 - ``COMPLEX(4) X``
74 - ``COMPLEX(4)``
75 - Fortran 77 and later
76 * - ``ZEXP(X)``
77 - ``COMPLEX(8) X``
78 - ``COMPLEX(8)``
79 - GNU extension
80 * - ``CDEXP(X)``
81 - ``COMPLEX(8) X``
82 - ``COMPLEX(8)``
83 - GNU extension