Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: (Golf) Multiply polynomials

by tye (Cardinal)
on May 11, 2001 at 13:43 UTC ( #79664=note: print w/ replies, xml ) Need Help??


in reply to Re: (Golf) Multiply polynomials
in thread (Golf) Multiply polynomials

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")


Comment on Re: Re: (Golf) Multiply polynomials
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-07-30 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls