I am writing some perl which is giving me an error that I do not understand.
# x is 2 to the 128th my $x = Math::BigFloat->new(q(2.0)); $x->bpow(q(128)); # ...more stuff... # $product starts as x! $product = $x->copy(); $product->bfac();
The error I get is
Can't use an undefined value as an ARRAY reference at /System/Library/Perl/5.8.6/Math/BigInt/Calc.pm line 899 (#1) (F) A value used as either a hard reference or a symbolic referenc +e must be a defined value. This helps to delurk some insidious errors. Uncaught exception from user code: Can't use an undefined value as an ARRAY reference at /System/Libr +ary/Perl/5.8.6/Math/BigInt/Calc.pm line 899. at /System/Library/Perl/5.8.6/Math/BigInt/Calc.pm line 899 Math::BigInt::Calc::_acmp('ARRAY(0x18690a0)', 'ARRAY(0x18690d0)') +called at /System/Library/Perl/5.8.6/Math/BigInt/Calc.pm line 1304 Math::BigInt::Calc::_fac('Math::BigInt::Calc', 'ARRAY(0x1868fc8)') + called at /System/Library/Perl/5.8.6/Math/BigFloat.pm line 1789 Math::BigFloat::bfac('Math::BigFloat=HASH(0x1868f5c)') called at r +epeat.pl line 19
I have googled and not found this question asked before. Can anyone explain what is going wrong? Thanks.
In reply to undefined value as an ARRAY by mgwmgw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |