SET_EXPONENT — Set the exponent of the model¶
- SET_EXPONENT(X, I)¶
SET_EXPONENT(X, I)
returns the real number whose fractional part is that that ofX
and whose exponent part isI
.- Parameters
X – Shall be of type
REAL
.I – Shall be of type
INTEGER
.
- Returns
The return value is of the same type and kind as
X
. The real number whose fractional part is that that ofX
and whose exponent part ifI
is returned; it isFRACTION(X) * RADIX(X)**I
.
Standard:
Fortran 90 and later
Class:
Elemental function
Syntax:
RESULT = SET_EXPONENT(X, I)
Example:
PROGRAM test_setexp REAL :: x = 178.1387e-4 INTEGER :: i = 17 PRINT *, SET_EXPONENT(x, i), FRACTION(x) * RADIX(x)**i END PROGRAM