[Oc-pm] perl6

Bob Mathews bobmath11 at icloud.com
Wed Sep 27 09:15:56 PDT 2017


> On Sep 26, 2017, at 11:25 AM, Bob Mathews <bobmath11 at icloud.com> wrote:
> Perl6 Deep Dive p58:
>> Thus, any Rat number is a rational value equal to the division N/D. The integer numerator part is a value that can be arbitrarily long. The denominator part is a 64-bit integer.

So it turns out that:
a) The book is incomplete. FatRat doesn’t have this behavior, but it’s not mentioned. I thought we were diving deep here.
b) The book is wrong. It is possible to create a Rat with a denominator larger than 64 bits, though it “usually” enforces that limit.
c) Perl6 is buggy. No surprise here.
> say 1.111111111111111111111
1.11111111111111111604544
 -bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/oc-pm/attachments/20170927/a42f578d/attachment.html>


More information about the Oc-pm mailing list