Next: SIGN, Previous: SELECTED_REAL_KIND, Up: Intrinsic Procedures

`SET_EXPONENT`

— Set the exponent of the model*Description*:`SET_EXPONENT(X, I)`

returns the real number whose fractional part is that that of`X`and whose exponent part if`I`.*Option*:- f95, gnu
*Class*:- elemental function
*Syntax*:`Y = SET_EXPONENT(X, I)`

*Arguments*:-
`X`shall be of type `REAL`

.`I`shall be of type `INTEGER`

. *Return value*:- The return value is of the same type and kind as
`X`. The real number whose fractional part is that that of`X`and whose exponent part if`I`is returned; it is`FRACTION(X) * RADIX(X)**I`

. *Example*:-
program test_setexp real :: x = 178.1387e-4 integer :: i = 17 print *, set_exponent(x), fraction(x) * radix(x)**i end program test_setexp