Jump to content

Formal power series: Difference between revisions

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

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.