diff --git a/doc/Language/numerics.pod6 b/doc/Language/numerics.pod6 index de25e9e10..1d0253fee 100644 --- a/doc/Language/numerics.pod6 +++ b/doc/Language/numerics.pod6 @@ -210,8 +210,20 @@ say ½ + ⅓ + ⅝ + ⅙; # OUTPUT: «1.625␤» If a I that produces a L answer would produce a L with denominator larger than 64 bits, that operation would instead return a L object. When I a L (i.e. when it is not -a result of some mathematical expression), however, a "fattish" L with -larger denominator will be created. +a result of some mathematical expression), however, a larger denominator can be used: + + my $a = 1 / (2⁶⁴ - 1); + say $a; # OUTPUT: «0.000000000000000000054␤» + say $a.^name; # OUTPUT: «Rat␤» + + my $b = 1 / 2⁶⁴; + say $b; # OUTPUT: «5.421010862427522e-20␤» + say $b.^name; # OUTPUT: «Num␤» + + my $c = Rat.new(1, 2⁶⁴); + say $c; # OUTPUT: «0.000000000000000000054␤» + say $c.^name; # OUTPUT: «Rat␤» + say $c.Num; # OUTPUT: «5.421010862427522e-20␤» =head2 C