SWDIV(X,Y)

Purpose

Provides software floating-point division algorithms when targeting and running on POWER5 processors.

This function returns the result of a floating-point division and can increase performance over the normal divide operator where your application performs division repeatedly within a loop.

Class

Elemental function

Argument type and attributes

X
can be of type REAL(4) or REAL(8).
Y
must be of the same type and kind type parameter as X.

Result type and attributes

Same as X and Y.

Result value

The result has a value equal to X/Y.

For REAL(4) arguments, the result is bitwise identical to IEEE division.

For REAL(8) arguments with -qstrict in effect, the result is bitwise identical to IEEE division.

For REAL(8) arguments with -qnostrict in effect, the result can differ slightly from the IEEE result.

Examples

The following example uses software division algorithms if compiled with the -qarch=pwr5 option and run on a POWER5 processor.

       REAL(4) :: A, B DIVRES1
       REAL(8) :: E, F DIVRES2

       DIVRES1 = SWDIV(A, B)
       DIVRES2 = SWDIV(E, F)
       END