Problems? Is your data what you think it is? | |
PerlMonks |
Re: Re: (Golf) Multiply polynomialsby tye (Sage) |
on May 11, 2001 at 13:43 UTC ( [id://79664]=note: print w/replies, xml ) | Need Help?? |
Sorry, wrong problem. p([1..5],[1..5]) should produce [qw(1 4 10 20 35 44 46 40 25)] because ( 1 + 2x + 3x^2 + 4x^3 + 5x^4 ) * ( 1 + 2x + 3x^2 + 4x^3 + 5x^4 ) is equal to 1 + 4x + 10x^2 + 20x^3 + 35x^4 + 44x^5 + 46x^6 + 40x^7 + 25x^8 where ^ is exponentiation (** in Perl), not bit-wise XOR. - tye (but my friends call me "Tye")
In Section
Meditations
|
|