Nimber arithmetic: Difference between revisions
m
→{{header|Raku}}: Simplify, style tweaks
m (→{{header|Phix}}: 25*25 output) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Simplify, style tweaks) |
||
Line 715:
sub infix:<⊗> (Int $x, Int $y) {
return $x
my $h = exp $x.lsb, 2;
return ($h ⊗ $y) ⊕ (($x ⊕ $h) ⊗ $y) if $x > $h;
return ($y ⊗ $x) if
return $x
$h = exp $comp.lsb, 2;
(($x +> $h) ⊗ ($y +> $h)) ⊗ (3 +< ($h - 1))
|