[UP]


Manual Reference Pages  - set_exponent (3)

NAME

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

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class

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
      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 19, 2019
Generated by manServer 1.08 from ff9e1bc7-edd6-4705-b297-64781eba587a using man macros.