This is the mail archive of the
mailing list for the GCC project.
Re: Converting floor to rint
Gabriel Dos Reis <email@example.com> writes:
|> "may" part refers to the fact whether the programmer might want
|> to run rint() under a particular floating-point control mode that
|> would permit rint() to raise the inexact exception.
|> rint() cannot unconditionally set it. If FENV_ACCESS is on and
|> FE_INEXACT is supported then rint() should raise the exception if
|> appropriate. That is my understanding.
If the implementation defines __STDC_IEC_559__ then F.9.6.4 applies. I
have no copy of IEC 60559, but if it states that rint must raise the
exception then it must do it independent of FENV_ACCESS. Otherwise, if
__STDC_IEC_559__ is not defined, then no requirements on the exceptions
are stated for rint, since 188.8.131.52 does not have a "shall".
Andreas Schwab, SuSE Labs, firstname.lastname@example.org
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."