Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Lagrange Polynomials in Perlby BrowserUk (Patriarch) |
on Apr 28, 2015 at 19:51 UTC ( [id://1125059]=note: print w/replies, xml ) | Need Help?? |
You cannot shift an array off the argument stack: my @x = shift; Assuming you are calling this as: lagrange( \@vals, \@funcs ); What you are shifting of the argument stack is an array reference; and to do that properly you need to assign it to a scalar variable:
And then indirect through that to get your values:
Do that for both your parameter arrays -- athough you do not seem to ever use @f anywhere in that function? Also, what do you think this does: my $point = @x;? With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
In Section
Seekers of Perl Wisdom
|
|