Boost logo

Boost :

From: Bronek Kozicki (brok_at_[hidden])
Date: 2006-05-28 07:00:47

Ben Artin wrote:
> If we are talking about infinite precision integers, then some example of
> reasonable invariants on integers that do not apply to unsigned integers might
> be:
> a + (-a) = 0

Hold on for a second. We pretty well know what (-a) means for built-in
unsigned integers (whose precision is limited), but that meaning is based on
number of bits used to represent the number. Once you take "infinite
precision" integer, that meaning is lost because we have no predefined number
of bits used to represent the number. I mean that infinite precision integer
cannot reproduce behaviour of built-in types. In other words, if you can
"infinitely" extend given positive number towards +inifnity, does it make any
sense to disallow its extension past zero? It makes me think that concept of
"unsigned integer with infinite precision" is self-contradictory.


Boost list run by bdawes at, gregod at, cpdaniel at, john at