]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/exponent.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / exponent.rst
CommitLineData
c63539ff
ML
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.. index:: EXPONENT, real number, exponent, floating point, exponent
7
8.. _exponent:
9
10EXPONENT --- Exponent function
11*******************************
12
13.. function:: EXPONENT(X)
14
15 ``EXPONENT(X)`` returns the value of the exponent part of :samp:`{X}`. If :samp:`{X}`
16 is zero the value returned is zero.
17
18 :param X:
19 The type shall be ``REAL``.
20
21 :return:
22 The return value is of type default ``INTEGER``.
23
24 Standard:
25 Fortran 90 and later
26
27 Class:
28 Elemental function
29
30 Syntax:
31 .. code-block:: fortran
32
33 RESULT = EXPONENT(X)
34
35 Example:
36 .. code-block:: fortran
37
38 program test_exponent
39 real :: x = 1.0
40 integer :: i
41 i = exponent(x)
42 print *, i
43 print *, exponent(0.0)
3ed1b4ce 44 end program test_exponent