Subject: | Warnings in BestFit() |
Hi,
when using the BestFit() function on Perl 5.8.4 on Debian GNU/Linux with
warnings enabled, I get:
% perl -MMath::NumberCruncher -w -e 'my ($s, $y) =
Math::NumberCruncher::BestFit([1,2],[1,2])'
Use of uninitialized value in multiplication (*) at
/usr/share/perl5/Math/NumberCruncher.pm line 160.
Use of uninitialized value in multiplication (*) at
/usr/share/perl5/Math/NumberCruncher.pm line 160.
Use of uninitialized value in exponentiation (**) at
/usr/share/perl5/Math/NumberCruncher.pm line 162.
This happens because there is an off-by-one error in the list indexing
inside BestFit(). I'm attaching a patch that fixes this.
Cheers,
--
Niko Tyni
ntyni@iki.fi
Subject: | index-patch |
Message body not shown because it is not plain text.