Manual Reference Pages  - maxexponent (3fortran)

NAME

MAXEXPONENT(3) - [MODEL:NUMERIC] 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 intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 maxexponent (3fortran) November 02, 2024
Generated by manServer 1.08 from ec9b5b67-906a-497c-8609-70c7dfd363cc using man macros.