This is the mail archive of the gcc@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: GCC optimizes integer overflow: bug or feature?



On 2006-12-20, at 22:48, Richard B. Kreckel wrote:


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?)

You are apparently using a different definition of an algebra or ring than the common one.


Integral types are an incomplete representation of the calculation domain, which is the natural numbers.

This is an arbitrary assumption. In fact most people simply are well aware of the fact that computer
don't to infinite arithmetics. You are apparently confusing natural numbers, which don't include negatives,
with integers. However it's a quite common mistake to forget how "bad" floats "model" real numbers.


This corroborates the validity of the analogy with IEEE real arithmetic.

And wrong assumptions lead to wrong conclusions.


Marcin Dalecki



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