in reply to Re^3: &1 is no faster than %2 when checking for oddness. Oh well.
in thread &1 is no faster than %2 when checking for oddness. Oh well.
There is no need for Math::BigInt to sum 1 .. 2**30:
$n = 576460752840294400; printf "%20.f\n", $n;; 576460752840294400
The problem is that (on my system),
use List::Util qw[ sum }; $n = sum 1 .. 2**26;
crashes Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: &1 is no faster than %2 when checking for oddness. Oh well.
by Limbic~Region (Chancellor) on Nov 16, 2006 at 20:13 UTC | |
by BrowserUk (Patriarch) on Nov 16, 2006 at 20:21 UTC |