]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/maxexponent.rst
8d42d60f6f3fc9420e17c5ba4a2492d29e28b775
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / maxexponent.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 .. index:: MAXEXPONENT, model representation, maximum exponent
7
8 .. _maxexponent:
9
10 MAXEXPONENT --- Maximum exponent of a real kind
11 ***********************************************
12
13 .. function:: MAXEXPONENT(X)
14
15 ``MAXEXPONENT(X)`` returns the maximum exponent in the model of the
16 type of ``X``.
17
18 :param X:
19 Shall be of type ``REAL``.
20
21 :return:
22 The return value is of type ``INTEGER`` and of the default integer
23 kind.
24
25 Standard:
26 Fortran 90 and later
27
28 Class:
29 Inquiry function
30
31 Syntax:
32 .. code-block:: fortran
33
34 RESULT = MAXEXPONENT(X)
35
36 Example:
37 .. code-block:: fortran
38
39 program exponents
40 real(kind=4) :: x
41 real(kind=8) :: y
42
43 print *, minexponent(x), maxexponent(x)
44 print *, minexponent(y), maxexponent(y)
45 end program exponents