In message <[EMAIL PROTECTED]> (on 19 December 2004 17:00:54 +0100), [EMAIL PROTECTED] (Tels) wrote: >-----BEGIN PGP SIGNED MESSAGE----- > >Moin Ed,
Allen, but don't worry about it. >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) Nice when things work out that way! >:~/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 Yep, works, thanks! BTW, what exactly are the changes for 64-bit systems? We're locally running with 64bitint (IRIX cc -n32) and long doubles, so this is a matter of interest here... >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. Oh? Interesting. It had actually speeded things up by probably a factor of 2 or so here, albeit in comparison to 1.73 Calc. >If you look for a lib to replace Calc, please use 'GMP', it scales much >better and is quite stable now. :o) OK, will take a look, thanks! -Allen -- Allen Smith http://cesario.rutgers.edu/easmith/ September 11, 2001 A Day That Shall Live In Infamy II "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin
