[UP]


Manual Reference Pages  - scale (3)

NAME

scale(3f) - [FORTRAN:INTRINSIC:MODEL_COMPONENTS] Scale a real value

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = scale(x, i)

DESCRIPTION

scale(x,i) returns x * radix(x)**i.

ARGUMENTS

X - The type of the argument shall be a REAL.
I - The type of the argument shall be a INTEGER.

RETURN VALUE

The return value is of the same type and kind as X. Its value is x * radix(x)**i.

EXAMPLE

Sample program:

    program demo_scale
      real :: x = 178.1387e-4
      integer :: i = 5
      print *, scale(x,i), x*radix(x)**i
    end program demo_scale
Results:

    0.570043862      0.570043862

STANDARD

[[Fortran 95]] and later

CLASS

[[Elemental procedure|Elemental function]]

SEE ALSO

[[radix]]


scale (3) March 19, 2019
Generated by manServer 1.08 from f9b34d4b-37b5-4e12-8d23-34e0f215f971 using man macros.