in reply to Re^2: rsFalse can't make some easy arithmetics :)
in thread Perl can't make some easy arithmetics :(
what do we gain by using machine-precision floating point as our default numeric representation?
I just watched an HD movie on my PC. In the 105 minutes of runtime, approximately 100 billion calculations are performed.
If these calculations were done using bigint, then the movie would take 34.5 days to watch...
cmpthese -1, { a=>q[my $t=0; $t *= $_ for 1 .. 1e3;], b=>q[use bigint; my $t=0; $t *= $_ for 1 .. 1e3 ] };; Rate b a b 23.8/s -- -100% a 11263/s 47292% --
I'm more than happy to have to consider the limitations of native machine precision.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: rsFalse can't make some easy arithmetics :)
by no_slogan (Deacon) on Oct 26, 2014 at 03:45 UTC | |
by BrowserUk (Patriarch) on Oct 26, 2014 at 14:13 UTC | |
|