(j3.2006) (SC22WG5.6009) IEEE_INT
John Reid
John.Reid
Wed Dec 20 13:47:46 EST 2017
WG5,
Do we have a problem with IEEE_INT (see 17.11.11 in N2137)? It has the form
IEEE_INT (A, ROUND [, KIND])
where ROUND is of type IEEE_ROUND_TYPE, so has one of the values
IEEE_NEAREST, IEEE_TO_ZERO, IEEE_UP, IEEE_DOWN, IEEE_AWAY and IEEE_OTHER
The value of A is converted to an integer according to the rounding mode
specified by ROUND using either convertToInteger{round} or the
convertToIntegerExact{round} operation.
My version of the IEEE standard is the FDIS and provides the functions
ConvertToIntegerTiesToAway,
ConvertToIntegerTiesToEven,
ConvertToIntegerTiesTowardNegative,
ConvertToIntegerTiesTowardPositive,
ConvertToIntegerTiesTowardZero,
and the corresponding Exact versions.
It is clear what happens with ROUND of value IEEE_TO_ZERO and IEEE_AWAY.
I suppose IEEE_UP and IEEE_DOWN give ConvertToIntegerTiesTowardPositive
and ConvertToIntegerTiesTowardNegative, that is, towards positive and
negative infinity, respectively. I think this needs to be said.
Does IEEE_OTHER give ConvertToIntegerTiesToEven?
What about IEEE_NEAREST?
Cheers,
John.
More information about the J3
mailing list