Visible to Intel only — GUID: GUID-09AC668C-9B77-44DF-8BEF-57DAC4332FE8
Visible to Intel only — GUID: GUID-09AC668C-9B77-44DF-8BEF-57DAC4332FE8
IEEE_MAX_NUM_MAG
Inquiry Module Intrinsic Function (Generic): Returns the maximum magnitude of two values. This is equivalent to the IEEE maxNumMag operation.
Module
USE, INTRINSIC :: IEEE_ARITHMETIC
result = IEEE_MAX_NUM_MAG (x,y)
x |
(Input) Must be of type REAL. |
y |
(Input) Must be of type REAL with the same kind type parameter as x. |
Results
The result type is REAL with the same kind type parameter as x. The result is x if ABS(y) < ABS(x). The result is the value of y if ABS(x) < ABS(y).
If one of the arguments is a quiet NaN, the result is the value of the argument which is not a quiet Nan. If either or both of the arguments is a signaling NaN, the result is a NaN and IEEE_INVALID signals. Otherwise, the result value is that of either x or y (processor dependent). No exceptions are signaled unless x or y is a signaling NaN.
This is the maxNumMag operation as specified in the ISO/IEC/IEEE 60559:2011 standard.
Example
The result value of IEEE_MAX_NUM_MAG (3.7, -7.5) is -7.5.