Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 about the Monastery: (9)
As of 2014-12-21 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls