EXPONENT — Exponent function#
-
EXPONENT(X)#
EXPONENT(X)
returns the value of the exponent part ofX
. IfX
is zero the value returned is zero.- Parameters
X – The type shall be
REAL
.- Returns
The return value is of type default
INTEGER
.
- Standard:
Fortran 90 and later
- Class:
Elemental function
- Syntax:
RESULT = EXPONENT(X)
- Example:
program test_exponent real :: x = 1.0 integer :: i i = exponent(x) print *, i print *, exponent(0.0) end program test_exponent