scale(3f) - [FORTRAN:INTRINSIC:MODEL_COMPONENTS] Scale a real value
result = scale(x, i)
scale(x,i) returns x * radix(x)**i.
X The type of the argument shall be a REAL. I The type of the argument shall be a INTEGER.
The return value is of the same type and kind as X. Its value is x * radix(x)**i.
Sample program:
program demo_scale implicit none real :: x = 178.1387e-4 integer :: i = 5 print *, scale(x,i), x*radix(x)**i end program demo_scaleResults:
0.570043862 0.570043862
[[Fortran 95]] and later
[[Elemental procedure|Elemental function]]
radix(3)
scale (3) | March 11, 2021 |