Does -0.5 fit an unsigned when truncated to an integer?

Torbjorn Granlund tg at
Tue Mar 19 11:59:17 CET 2013

Vincent Lefevre <vincent at> writes:

  > I haven't though a lot about this, but it is not clear that -1 + eps
  > should be considered to fit an unsigned type.

We need to decide how to define the edge conditions.

We could either see at as "can be assigned to type without havoc" or "is
in the range of type" (or perhaps something other even better...).

The former definition might make more sense from a computer science
perspective, the latter is what a mathematician would probably prefer.


More information about the gmp-devel mailing list