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

Re: (Golf) Multiply polynomials

by Masem (Monsignor)
on May 07, 2001 at 18:45 UTC ( #78512=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    sub p {
      my$a=shift;my$b=shift;my(@c,$i,$j);for$i(0..$#$a){for$j(0..$#$b){$c[
    +$i+$j]+=$$a[$i]*$$b[$j]}};@_?p(\@c,@_):\@c
    }
    
  2. or download this
    sub p {
      my$a=shift;my$b=shift;my(@c,$i);for$i(0..$#$a){for(0..$#$b){$c[$i+$_
    +]+=$$a[$i]*$$b[$_]}};@_?p(\@c,@_):\@c
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-07-11 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls