in reply to Re: Infinity and Inf?
in thread Infinity and Inf?
Both of the following would get you the max int:Or with less obfuscation ...use constant MAX_INT => unpack('J', pack('j', -1)); use constant MAX_INT => 0+sprintf('%u', -1);
use constant MAXINT => ~0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Infinity and Inf?
by ikegami (Patriarch) on Sep 01, 2010 at 15:54 UTC | |
|
Re^3: Infinity and Inf? (MAX_INT)
by LanX (Saint) on Sep 01, 2010 at 12:58 UTC | |
by ikegami (Patriarch) on Sep 01, 2010 at 15:51 UTC | |
by LanX (Saint) on Sep 01, 2010 at 16:36 UTC | |
by ikegami (Patriarch) on Sep 01, 2010 at 19:16 UTC | |
by BrowserUk (Patriarch) on Sep 01, 2010 at 14:53 UTC | |
by ikegami (Patriarch) on Sep 01, 2010 at 16:08 UTC | |
by LanX (Saint) on Sep 01, 2010 at 15:09 UTC | |
by BrowserUk (Patriarch) on Sep 01, 2010 at 16:42 UTC | |
by LanX (Saint) on Sep 01, 2010 at 17:12 UTC | |
| |
by BrowserUk (Patriarch) on Sep 01, 2010 at 13:16 UTC | |
by LanX (Saint) on Sep 01, 2010 at 13:27 UTC | |
by tye (Sage) on Sep 01, 2010 at 13:53 UTC | |
by LanX (Saint) on Sep 01, 2010 at 14:29 UTC |