Re: Conflicts between C standard and 754-2008
On Jan 1 2011, Michel Hack wrote:
In the stds-754 thread Fred Tydeman came up with the right answer, by
quoting an up-to-date version of the C standard:
-> and default rounding is in effect (7.12.1),
Which applies to almost all of <math.h>, too.
So indeed, there is no conflict. Unfortunately some IMPLEMENTATIONS of
the various conversion functions must have overlooked that tidbit too.
No, there is no conflict, because overflowing with a non-default mode
in effect is undefined behaviour, and therefore compilers can do anything
they like (and probably will). From a compiler writer's point of view,
no problem - just don't try to write portable interval code using that
as a base.
There's a similiar issue to do with the rounding of negative strings
(see footnote 249).
Regards,
Nick Maclaren.