Formal power series: Difference between revisions
Content added Content deleted
m (→{{header|Perl 6}}: spaces after commas) |
m (→{{header|Perl 6}}: Shorten "multi sub" to "multi".) |
||
Line 1,161: | Line 1,161: | ||
# some arithmetic operations for formal power series |
# some arithmetic operations for formal power series |
||
multi |
multi infix:<+>(FPS $x, FPS $y) { SumFPS.new(:$x, :$y); } |
||
multi |
multi infix:<->(FPS $x, FPS $y) { DifFPS.new(:$x, :$y); } |
||
multi |
multi infix:<*>(FPS $x, FPS $y) { ProFPS.new(:$x, :$y); } |
||
multi |
multi infix:</>(FPS $x, FPS $y) { $x * InvFPS.new(:x($y)); } |
||
# an example for a mixed-type operator: |
# an example for a mixed-type operator: |