SCALE (The GNU Fortran Compiler)

### 8.243 `SCALE` — Scale a real value ¶

Synopsis:

  `RESULT = SCALE(X, I)`

Description:

  `SCALE(X,I)` returns `X * RADIX(X)**I`.

Class:

  Elemental function

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:

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

Standard:

  Fortran 90 and later