Subject: | $x**$y with accuracy >= 67, $x >= 1000 and $y not integer or 0.5 |
Date: | Thu, 10 May 2012 12:41:36 +0300 |
To: | bug-Math-BigInt [...] rt.cpan.org |
From: | Jouni Pekkanen <jouni.pekkanen [...] qentinel.com> |
Hi,
When I run this
use 5.010;
use strict;
use warnings;
use Math::BigFloat;
my $xx = 1000;
my $x = Math::BigFloat->new($xx);
my $y = rand(10);
for my $a (65 .. 68) {
$x->accuracy($a);
say "$a: $xx**$y ", ($x**$y);
}
I get results like this
65: 1000**0.299018079954298 7.8895864600984835720528135951950551836538124300181660092503552481
66: 1000**0.299018079954298 7.88958646009848357205281359519505518365381243001816600925035524814
67: 1000**0.299018079954298 9.706611578692184195066301629228105510868624252587447343398271978424
68: 1000**0.299018079954298 9.7066115786921841950663016292281055108686242525874473433982719784244
This happens with every random old Debian or Ubuntu system I've tried
this on, and an old Solaris system with perl v5.8.4 seems to hang with a
Show quoted text
>= 67.
--
Qentinel Oy, Jouni Pekkanen
Jouni.Pekkanen@qentinel.com, +358 50 331 6721
Äyritie 12 B, 01510 Vantaa, Finland
http://www.qentinel.com