|No such thing as a small change|
Re: (Golf) Multiply polynomialsby jeroenes (Priest)
|on May 11, 2001 at 13:30 UTC||Need Help??|
I know it's a tad late, but here is my $0.01. To my opinion PDL is neglected around here, and I know I use it too little myself.
With the help of PDL I only use 43 chars for the sub, and if I looked right, it's a record in this thread. You may add 8 chars if you want to account for the extra 'use PDL;' statement:
This doesn't work with arrays of unequal length, but that wasn't in the spec. The output:
BTW, tilly, why did you name it 'polynomials'? Isn't it just a breed of recursive vector multiplication? Do I miss something?
And, 'strictness' requires only 3 extra chars with a total of 46/54 chars (54 still is the record):
"We are not alone"(FZ) Update Thx to tye I now know why tilly talked about polynomials. Sorry. If we still want a matrix-kind solution, it would be like:
But that's difficult to code in PDL, unfortunately. Here is my 2nd attempt, works only if poly's are equal length (pathetic 164 chars):
Will ponder it a bit more and get back....