The perennial i386 floating-point rounding issue...
Robert Dewar
dewar@gnat.com
Sat Jun 22 06:19:00 GMT 2002
> The vast majority of the user problems like this that I have analyzed
> involve an innocent-looking program that does a compare operation
> to an extra-precise register value. In other words, the most common
> problem is not that we truncate values but that we fail to truncate
> values.
Innocent? I think not, such programs are simply incorrect if they expect
the equality operation to yield true. Now it is indeed unfortunate that
C provides no control over machine number representation (something
equivalent to the 'Machine attribute of Ada), but that's not our fault :-)
We could perhaps provide such an attribute as a GCC extension.
More information about the Gcc
mailing list