max

Returns the maximum of the two operands (or NaN).

If either is a signaling NaN, or both are quiet NaNs, a NaN is returned. Otherwise, any finite or infinite number is larger than a NaN.

If they are not numerically equal, the larger is returned. If they are numerically equal: 1. If the signs differ, the one with the positive sign is returned. 2. If they are positive, the one with the larger exponent is returned. 3. If they are negative, the one with the smaller exponent is returned. 4. Otherwise, they are indistinguishable; the first is returned. The returned number will be rounded to the current context. Implements the 'max' function in the specification. (p. 32) Flags: INVALID_OPERATION, ROUNDED.

D
max
(
D
)
(
in D left
,
in D right
,
Context context = D.context
)

Meta