rational number operator

Run Settings
LanguagePerl 6
Language Version
Run Command
my Rat @ex01 = 1.0 , * + 0.9999 ... Inf; my Rat @ex02 = 1.0 , * - 0.9999 ... Inf; my Rat @ex03 = 1.0 , * * 0.9999 ... Inf; my Rat @ex04 = 1.0 , * / 0.9999 ... Inf; my Rat @ex05 = 1.0 , * % 0.9999 ... Inf; my %ex = :add(@ex01), :substrat(@ex02), :mult(@ex03), :div(@ex04), :mod(@ex05); my $int_max = 2 * 63 - 1; try { for < add substrat mult div mod > -> $op { for 1 .. 20 -> $count { "$op $count".say; %ex{$op}[$count]; } } }
Editor Settings
Theme
Key bindings
Full width
Lines