8.2.7 Reciprocal Substitution

When /roundoff>2 , KAP performs reciprocal substitution to move an expensive division outside a loop. In the following example, since the variable R is not changed in the loop, the division can be replaced by multiplication by its reciprocal:

DO 1 I=1,N
A(I) = B(I)/R
1    CONTINUE

Becomes:

RR1=1.0/R
DO 1 I=1,N
A(I) = B(I)*RR1
1    CONTINUE


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers