Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 taking refuge in the Monastery: (8)
As of 2014-12-21 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (104 votes), past polls