FNMSUB(A, X, Y)

Purpose

Floating-point Negative Multiply and Subtract

Returns the result of a floating-point negative multiply-subtract.

Class

Function

Argument type and attributes

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

Result type and attributes

Same as A, X, and Y.

Result value

The result has a value equal to -(A*X - Y).

Examples

In the following example, the result of FNMSUB is of type REAL(4). It is converted to REAL(8) and then assigned to RES.

    REAL(4) :: A, B, C
    REAL(8) :: RES

    RES = FNMSUB(A, B, C)
    END