Next: EXTENDS_TYPE_OF, Previous: EXP, Up: Intrinsic Procedures [Contents][Index]
EXPONENT — Exponent functionEXPONENT(X) returns the value of the exponent part of X. If X
is zero the value returned is zero.
Fortran 95 and later
Elemental function
RESULT = EXPONENT(X)
| X | The type shall be REAL. |
The return value is of type default INTEGER.
program test_exponent real :: x = 1.0 integer :: i i = exponent(x) print *, i print *, exponent(0.0) end program test_exponent