Syntactic Confectionery Delight | |
PerlMonks |
Re: recursive formula.by herveus (Prior) |
on Aug 05, 2004 at 14:53 UTC ( [id://380273]=note: print w/replies, xml ) | Need Help?? |
Howdy!
gave the following output:
The expansion looks similar to computing a determinant, but not quite...this is a straight-up translation of the formula into Perl. No trickery; no premature optimization. Update: I elected to prepend a zero to the array of r values to simplify life. That also means that the indices in the formula now correspond to the array indices in the Perl code, making the Perl read more nearly like the formula. I elected to construct the array for the recursion explicitly, by directly striking the omitted r value. This is meant to make it easier to audit the code to verify that it says what it is meant to say...
yours, Michael
In Section
Seekers of Perl Wisdom
|
|