Does -0.5 fit an unsigned when truncated to an integer?
Torbjorn Granlund
tg at gmplib.org
Tue Mar 19 11:59:17 CET 2013
Vincent Lefevre <vincent at vinc17.net> 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.
Why?
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.
--
Torbjörn
More information about the gmp-devel
mailing list