[UP]


Manual Reference Pages  - set_exponent (3)

NAME

set_exponent(3f) - [FORTRAN:INTRINSIC:MODEL_COMPONENTS] Set the exponent of the model

SYNTAX

result = set_exponent(x, i)

DESCRIPTION

set_exponent(x, i) returns the real number whose fractional part is that of X and whose exponent part is 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

Sample program:

    program demo_setexp
    implicit none
      real :: x = 178.1387e-4
      integer :: i = 17
      print *, set_exponent(x, i), fraction(x) * radix(x)**i
    end program demo_setexp

STANDARD

[[Fortran 95]] and later

CLASS

[[Elemental procedure|Elemental function]]


set_exponent (3) March 11, 2021
Generated by manServer 1.08 from 5ed604d0-0c15-49ec-b8f6-a3ac77eddea6 using man macros.