Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: (Golf) Multiply polynomials

by tye (Sage)
on May 11, 2001 at 13:43 UTC ( [id://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")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found