Manual Reference Pages  - maxexponent (3fortran)

NAME

MAXEXPONENT(3) - [NUMERIC MODEL] Maximum exponent of a real kind

SYNOPSIS

result = maxexponent(x)

         elemental integer function maxexponent(x)

real(kind=**),intent(in) :: x

CHARACTERISTICS

o X is a real scalar or array of any real kind
o the result is a default integer scalar

DESCRIPTION

MAXEXPONENT(3) returns the maximum exponent in the model of the type of X.

OPTIONS

o X : A value used to select the kind of real to return a value for.

RESULT

The value returned is the maximum exponent for the kind of the value queried

EXAMPLES

Sample program:

    program demo_maxexponent
    use, intrinsic :: iso_fortran_env, only : real32,real64,real128
    implicit none
    character(len=*),parameter :: g=’(*(g0,1x))’
       print  g,  minexponent(0.0_real32),   maxexponent(0.0_real32)
       print  g,  minexponent(0.0_real64),   maxexponent(0.0_real64)
       print  g,  minexponent(0.0_real128),  maxexponent(0.0_real128)
    end program demo_maxexponent

Results:

       -125 128
       -1021 1024
       -16381 16384

STANDARD

Fortran 95

SEE ALSO

DIGITS(3), EPSILON(3), EXPONENT(3), FRACTION(3), HUGE(3), MINEXPONENT(3), NEAREST(3), PRECISION(3), RADIX(3), RANGE(3), RRSPACING(3), SCALE(3), SET_EXPONENT(3), SPACING(3), TINY(3)

fortran-lang intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 maxexponent (3fortran) April 28, 2024
Generated by manServer 1.08 from c30e766a-fdea-4a4f-b2d5-bfb9be6759d0 using man macros.