Raku Books / Perl 6 at a Glance / Operators / Numerical operators

+<, +>

+< and +> are the left and right shift operators.

say 8 +< 2;    # 32
say 1024 +> 8; # 4

gcd calculates the greatest common denominator of the two integer operands.

say 50 gcd 15; # 5

lcm finds the least common multiple value for the given operands.

say 1043 lcm 14; # 2086

Course navigation

?|, ?&, ?^   |   ==, !=