bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC optimizes integer overflow: bug or feature?


From: Richard B. Kreckel
Subject: Re: GCC optimizes integer overflow: bug or feature?
Date: Wed, 20 Dec 2006 22:48:21 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20061113)

Marcin Dalecki wrote:

Numerical stability of incomplete floating point representations are an entirely different problem category then some simple integer tricks. In the first case the difficulties are inherent to the incomplete representation of the calculation domain. In the second case it's just some peculiarities of the underlying machine as well as the fact that the unsigned qualifier is not used nearly enough frequently in common code. Or in other words: Z/32 resp. 64 IS AN ALGEBRA but
float isn't! Thus this argument by analogy simply isn't valid.


Sheesh! This argument is totally confused...

1) Z/Zn and, by isomorphism, unsigned types may be an algebra. But this entire discussion is about signed types, not unsigned types. 2) Signed types are not an algebra, they are not even a ring, at least when their elements are interpreted in the canonical way as integer numbers. (Heck, what are they?) 3) Making behavior partially undefined certainly does not help making it an algebra or any other well-defined mathematical structure.

Integral types are an incomplete representation of the calculation domain, which is the natural numbers. This corroborates the validity of the analogy with IEEE real arithmetic.

-richy.

--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]