mpz_get_si: possible undefined behaviour? [Was: Micro-GMP]

Vincent Lefevre vincent at vinc17.net
Tue Dec 4 14:31:41 UTC 2018


On 2018-12-04 07:39:52 +0100, Torbjorn Granlund wrote:
> Marco Bodrato <bodrato at mail.dm.unipi.it> writes:
> 
>   But, what about the LONG_MIN == -LONG_MAX case?
>   The result is undefined, isn't it?
> 
> Does anybody (apart from Vincent) have access to such a machine?
> :-)

I don't have access to such a machine :) but FYI:

  https://stackoverflow.com/questions/12276957/are-there-any-non-twos-complement-implementations-of-c

which mentions UNISYS 2200, which could still be in used.
However, note also that this is a 36-bit machine:

  https://en.wikipedia.org/wiki/UNIVAC_1100/2200_series

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-devel mailing list