MINEXPONENT(3) - [MODEL:NUMERIC] Minimum exponent of a real kind
result = minexponent(x)
elemental integer function minexponent(x)real(kind=**),intent(in) :: x
o X is a real scalar or array of any real kind o the result is a default integer scalar
MINEXPONENT(3) returns the minimum exponent in the model of the type of X.
o X : A value used to select the kind of real to return a value for.
The value returned is the maximum exponent for the kind of the value queried
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_minexponentExpected Results:
> -125 128 > -1021 1024
Fortran 95
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 |