harangzsolt33 has asked for the wisdom of the Perl Monks concerning the following question:
Here is a simple example:
my $MAXQUAD = 18446744073709551615; # equals 0xffffffffffffffff for (my $i = 0; $i <= $MAXQUAD; $i++) { printf("\n %f", $i); } exit;
Please ignore the fact that this will take forever to count from 0 to $MAXQUAD, but would it actually work? ...because in a 32-bit environment, this loop will never end! It will count from 0 to 9007199254740992, and it will not increment beyond that. It will just get stuck at that number.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Largest integer in 64-bit perl
by NERDVANA (Priest) on May 16, 2025 at 18:48 UTC | |
by LanX (Saint) on May 16, 2025 at 19:29 UTC | |
Re: Largest integer in 64-bit perl
by syphilis (Archbishop) on May 17, 2025 at 02:19 UTC | |
Re: Largest integer in 64-bit perl
by ikegami (Patriarch) on May 17, 2025 at 15:15 UTC | |
Re: Largest integer in 64-bit perl
by pfaut (Priest) on May 16, 2025 at 18:06 UTC | |
by harangzsolt33 (Deacon) on May 17, 2025 at 00:18 UTC | |
by pfaut (Priest) on May 17, 2025 at 00:34 UTC | |
Re: Largest integer in 64-bit perl
by jwkrahn (Abbot) on May 16, 2025 at 23:41 UTC | |
by ikegami (Patriarch) on May 18, 2025 at 03:59 UTC | |
Re: Largest integer in 64-bit perl
by BillKSmith (Monsignor) on May 27, 2025 at 01:21 UTC | |
by ikegami (Patriarch) on May 27, 2025 at 12:17 UTC | |
by LanX (Saint) on May 27, 2025 at 12:36 UTC | |
by ikegami (Patriarch) on May 27, 2025 at 12:53 UTC | |
by syphilis (Archbishop) on May 27, 2025 at 14:24 UTC | |
| |
by karlgoethebier (Abbot) on May 29, 2025 at 09:52 UTC | |
by LanX (Saint) on May 29, 2025 at 21:12 UTC | |
by syphilis (Archbishop) on May 30, 2025 at 00:41 UTC | |
| |
by karlgoethebier (Abbot) on May 30, 2025 at 08:55 UTC | |
by LanX (Saint) on May 29, 2025 at 13:22 UTC | |
by Athanasius (Archbishop) on May 29, 2025 at 13:43 UTC | |
by karlgoethebier (Abbot) on May 29, 2025 at 13:43 UTC | |
by karlgoethebier (Abbot) on May 29, 2025 at 13:58 UTC | |
by ikegami (Patriarch) on May 29, 2025 at 16:50 UTC | |
by BillKSmith (Monsignor) on May 31, 2025 at 21:21 UTC | |
by LanX (Saint) on Jun 01, 2025 at 10:43 UTC | |
by BillKSmith (Monsignor) on Jun 02, 2025 at 14:50 UTC | |
| |
by ikegami (Patriarch) on Jun 01, 2025 at 10:10 UTC | |
by BillKSmith (Monsignor) on Jun 02, 2025 at 04:24 UTC | |
| |
Re: Largest integer in 64-bit perl
by LanX (Saint) on May 16, 2025 at 18:39 UTC | |
by ikegami (Patriarch) on May 18, 2025 at 04:07 UTC | |
by LanX (Saint) on May 18, 2025 at 11:56 UTC | |
by syphilis (Archbishop) on May 19, 2025 at 04:09 UTC | |
by LanX (Saint) on May 19, 2025 at 10:01 UTC | |
Re: Largest integer in 64-bit perl
by Anonymous Monk on May 16, 2025 at 18:16 UTC |