This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Converting floor to rint


Gabriel Dos Reis <gdr@integrable-solutions.net> 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 7.12.9.4 does not have a "shall".

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]