in reply to Re: Re: How to portably determine integer limits?
in thread How to portably determine integer limits?
I didn't see any good answers to this given. I'd do:
where you could choose to use that last line instead of the second-to-last line if you aren't paranoid like me.my $x= 1+~0; $x *= 2 while $x != $x+1; print "You can safely use integer values between ", -$x/2, " and ", $x/2, $/; # -$x, " and ", $x-1, $/;
|
|---|