in reply to Re: How to portably determine integer limits?
in thread How to portably determine integer limits?
Due to rounding it won't happen if you keep adding 1, but if you keep increasing $i, even the floating point number will run out of bits; then $i becomes "not a number".If it's IEEE-754 floating point it should become +Inf...
# nvtype='double', nvsize=8; perl -le 'for$ex(0..128){$i=2**$ex;print"$ex $i"and last if$i==$i+1}'
|
|---|