Manual Reference Pages  - minexponent (3fortran)

NAME

MINEXPONENT(3) - [MODEL:NUMERIC] Minimum exponent of a real kind

SYNOPSIS

result = minexponent(x)

         elemental integer function minexponent(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

MINEXPONENT(3) returns the minimum 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_minexponent
    use, intrinsic :: iso_fortran_env, only : real32, real64, real128
    implicit none
    real(kind=real32) :: x
    real(kind=real64) :: y
        print *, minexponent(x), maxexponent(x)
        print *, minexponent(y), maxexponent(y)
    end program demo_minexponent

Expected Results:

      >     -125         128
      >    -1021        1024

STANDARD

Fortran 95

SEE ALSO

DIGITS(3), EPSILON(3), EXPONENT(3), FRACTION(3), HUGE(3), MAXEXPONENT(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 minexponent (3fortran) November 02, 2024
Generated by manServer 1.08 from 4d88d7f7-8f2d-4e06-a933-ef29f4953425 using man macros.