SET_EXPONENT

8.218 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 is I.
Standard:
Fortran 95 and later
Class:
Elemental function
Syntax:
RESULT = 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, i), FRACTION(x) * RADIX(x)**i
END PROGRAM

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/SET_005fEXPONENT.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部