-----BEGIN PGP SIGNED MESSAGE-----

Moin Ed,

On Sunday 21 November 2004 18:00, Ed Allen Smith wrote:
> In message <[EMAIL PROTECTED]> (on 21 
November 2004 08:34:44 -0500), [EMAIL PROTECTED] (Ed Allen Smith) 
wrote:
> >In message <[EMAIL PROTECTED]> (on 21
> >November 2004 08:25:57 -0500), [EMAIL PROTECTED]
> >
> >([EMAIL PROTECTED]) wrote:
> >>This distribution has been tested as part of the cpan-testers
> >>effort to test as many new uploads to CPAN as possible.  See
> >>http://testers.cpan.org/
> >>
> >>I suspect I may wind up installing this anyway:
>
> On second thought, with FastCalc, the following coredumps with a SIGSEGV:
>
> use Math::BigFloat lib => 'FastCalc';
> use warnings;
>
> Math::BigInt->accuracy(undef);
> Math::BigInt->precision(undef);
> Math::BigInt->div_scale(53*2);
> Math::BigFloat->accuracy(undef);
> Math::BigFloat->precision(undef);
> Math::BigFloat->div_scale(53*2);
>
> $num1 = new Math::BigFloat "212810988215683677989664967567559";
>
> $num2 = new Math::BigFloat "5097575504458999984164528930580800";
>
> $num3 = new Math::BigFloat "-559451250909552448081850892236801";
>
> $num4 = new Math::BigFloat "45878179540130999857480760375227200";
>
> $num5 = Math::BigInt::blcm($num2,$num4);
>
> $num1_mult = $num5/$num2;
> $num3_mult = $num5/$num4;
>
> $num = (($num1*$num1_mult)+($num3*$num3_mult))/$num5;
>
> print $num->bstr() . "\n";
>
> $num->bround(53);
>
> print $num->bstr() . "\n";
>
> Stack trace:
> Perl_av_len(<stripped>) ["av.c":677, 0x100cd070]
> XS_Math__BigInt__FastCalc__is_zero(<stripped>) ["FastCalc.xs":375,
> 0x09f550bc] Perl_pp_entersub(<stripped>) ["pp_hot.c":2773, 0x100983a0]
> Perl_runops_debug(<stripped>) ["dump.c":1398, 0x1011c228]
> S_run_body(<stripped>) ["perl.c":1681, 0x100c4f74]
> perl_run(<stripped>) ["perl.c":1600, 0x100c4b00]
> main(<stripped>) ["perlmain.c":85, 0x1001dbf4]
> __start(<stripped>) ["crt1text.s":177, 0x1001dae8]
>
> With Calc:
>
> Can't use an undefined value as an ARRAY reference at
> /usr/share/lib/perl5/5.8.0/Math/BigInt/Calc.pm line 980.

I can reproduce this with Math::BigInt v1.73, but not with v1.74 (which I 
intent to release shortly). (It seems your script dies at the "blcm" call, 
and the reason is because you pass it BigFloats, and __lcm() could not handle 
this, nor forward them to BigFloat (because blcm() was borken in BigFloat 
since basically ever - even MBI v1.28 or so has the same borkened version).

I noticed the non-working bgcm() and blcm() calls a few days ago, fixed it 
today, fixed something in BigInt related to __lcm(), and only then dug out 
your report and found it was also fixed :o)

:~/perl/math/Math-BigInt-1.73> perl -Ilib core.pl
Can't use an undefined value as an ARRAY reference at lib/Math/BigInt/Calc.pm 
line 980.
:~/perl/math/Math-BigInt-1.74> perl -Ilib core.pl
0.02955321367635349698196488311203224657733277925009198076731622388624965866492863628736572899380612750478561
0.029553213676353496981964883112032246577332779250091981

Can you please retry this with v1.74 from:

        http://bloodgate.com/perl/packages/devel/Math-BigInt-1.74.tar.gz

As for FastCalc failing, I intent to deprecate that package. It really doesn't 
speed things up much, but creates tons of problems due to XS. If you look for 
a lib to replace Calc, please use 'GMP', it scales much better and is quite 
stable now. :o)

Best wishes,

Tels

- -- 
 Signed on Sun Dec 19 16:58:50 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "online porn is the most concerning thing to psychological health that I
 know of existing today." -- Mary Anne Layden in ttp://tinyurl.com/6a9cy (I
 fear what she will say about violence in computer games, evening news or
 Hollywood block-busters...)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQcWlvncLPEOTuEwVAQFQEwf9ESnoJEi5x88Wt1oxDx3KDku4mSSHRUBf
G825hEAgyYWD6lTPNQJOvbVOONLWyTVu1WUVoDH0k4dfo8aU4nc/XiKlI/o9FpHk
Dti7kFR1oGg84yAunuChMzCDu13tZ/CyUbJ5/SQMFM/vrC90/eSq9+ZI4cQEs7AK
xUk/7drhC/vGQSZzCXhUrDYtOSVEfe+Ne794AUqqRM5H58lo4INQ0oXYP86jQnei
syy1XLspGO4mUz5jvxm54cBP2XBOMiOXumbPgVxYGm/uouYlSUgL4RVIWGHEwm0S
pLjcBJa6znCZ/11Hm5rBkh0+TE6Yf25vhLYItr2S77ZQidqJnPZecA==
=auAB
-----END PGP SIGNATURE-----

Reply via email to