creachadair / imath

Arbitrary precision integer and rational arithmetic library
Other
129 stars 20 forks source link

ULONG_MIN does not exist #19

Closed lhf closed 6 years ago

lhf commented 6 years ago

MP_USMALL_MIN is defined in imath.h as follows:

define MP_USMALL_MIN ULONG_MIN

However, ULONG_MIN does not exist in C99. The reason is that it is always 0.

I suggest this change:

define MP_USMALL_MIN 0UL

However, MP_USMALL_MIN is never used in imath.c. You could simply remove it from imath.h.

lhf commented 6 years ago

Closed #19 via 0e17c4a.

Thanks! I came across #19 and #20 when writing a Lua binding for imath: http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#limath