And note that I handle 0 or more polynomials correctly. (The empty product in math is "1".)sub p{ my@m=1;for my$p(@_){my@a;for my$i(0..@m){my$j;$a[$i+$j++]+=$_*$m[$i]fo +r@$p}@m=@a}\@m }
In reply to Re (tilly) 5: (Golf) Multiply polynomials
by tilly
in thread (Golf) Multiply polynomials
by tilly
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |