while im just take alook at stdlib (I start refreash my knowlege in c latly) , I found this
while
-(LONG_MIN + LONG_MAX) +LONG_MAX = -LONG_MIN
why it is not like this
is there any meaning to this operation
the version in this link seem correct
http://www.koders.com/c/fid0A9B008CA98BE77AEC5E59AFC19BECAE325AC60F.aspx
but src code in my machine for freebsd is look like the first code
Code:
cutoff = neg ? (unsigned long)-(LONG_MIN + LONG_MAX) + LONG_MAX
-(LONG_MIN + LONG_MAX) +LONG_MAX = -LONG_MIN
why it is not like this
Code:
cutoff = neg ? (unsigned long)-LONG_MIN
the version in this link seem correct
http://www.koders.com/c/fid0A9B008CA98BE77AEC5E59AFC19BECAE325AC60F.aspx
but src code in my machine for freebsd is look like the first code