Intel® Fortran Compiler 16.0 User and Reference Guide

IEEE_COPY_SIGN

Elemental Module Intrinsic Function (Generic): Returns an argument with a copied sign. This is equivalent to the IEEE copysign function.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_COPY_SIGN (x,y)

x

(Input) Must be of type REAL.

y

(Input) Must be of type REAL.

Results

The result type and kind is the same as x. The result has the value x with the sign of y. This is true even for IEEE special values, such as NaN or infinity.

The flags information is returned as a set of 1-bit flags.

Example

The value of IEEE_COPY_SIGN (X,3.0) is ABS (X), even when X is NaN.

See Also