This is the mail archive of the
mailing list for the GCC project.
Re: floating point war casualty list
Roman Lechtchinsky wrote:
> On Wed, 29 May 2002, Zack Weinberg wrote:
>>Unpack, please: are you saying that real.c's implementation of single
>>precision VAX_FLOAT_FORMAT is (incorrectly) identical with what it
>>does under IEEE_FLOAT_FORMAT?
> Yes, that's true, except for infinities and nans. There is even a comment
> saying "DEC float is the same as IEEE float".
No, the rounding rules are subtly different: the VAX rounds the mantissa
up whenever the first bit after the mantissa is one, IEEE rounds to the
nearest or even, which gives the same result except when the exact result
falls midway between two representable values.
Another nitpick: VAX does not have negative zero, a zero with the sign
bit set is called a reserved operands and causes a fault.