Please consider assisting them by taking the survey about your participation in the Perl/Raku community.

Considered ... and declined.
Raku provided the opportunity to drag perl into the 21st century but, in terms of the way that numbers are handled, they opted to stick with an approach that I would term "neanderthal".
So I quickly lost interest. (But that's only because the way that numbers are handled is important to me ... and I do realize that there are others with different priorities.)

To elaborate, here's the approach that python3 chose to follow:
$ cat demo.py from fractions import Fraction; print (Fraction(1, 10) == 0.1); # False print (Fraction(3602879701896397, 36028797018963968) == 0.1); # True $ python3 demo.py False True
And here's the approach that raku has elected to follow:
C:\_32>type demo.r my $x = 1/10; say $x.nude; my $y = 3602879701896397/36028797018963968; say $y.nude; say $x == 0.1e0; say $y == 0.1e0; say $y == $x; C:\_32>raku demo.r (1 10) (3602879701896397 36028797018963968) True True False
>type demo.r say 1/10 == 0.1e0; say 3602879701896397/36028797018963968 == 0.1e0; >raku demo.r True True
Both the raku and python3 scripts are comparing the same rationals to the same double precision floating point value, and yet they provide different results.

Sure, I get that both of the rationals (1/10 and 3602879701896397/36028797018963968) round to the same double precision floating point value - and that's why raku reports "True" in both instances.
But the thing is that the double 0.1 does have a precise and exact rational value - and that precise and exact rational value is 3602879701896397/36028797018963968 (or, in decimal, 0.1000000000000000055511151231257827021181583404541015625) and not the precise and exact rational value of 1/10 (in decimal, 0.1).

I don't know why raku has made this choice. Anyone ?
The most annoying thing about it is that it implies that (the rational) 1/10 == (the rational) 3602879701896397/36028797018963968 ... yet raku itself will tell you that isn't so (if you explicitly ask it about that).

I'm inclined to think that it was done simply to annoy me ... though, somewhere deep inside, I think that even I realize that I'm probably not quite that important ;-)

Cheers,
Rob

In reply to Re: Research into occasional participation in Perl/Raku development by syphilis
in thread Research into occasional participation in Perl/Raku development by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.