in reply to Re: [Raku] Arcane treatment of doubles and rationals
in thread [Raku] Arcane treatment of doubles and rationals
I have:> say 3602879701896397/36028797018963968 == 0.100000000000000006; False
If the RHS is a rational, then it's fairly easy to show that 3602879701896397/36028797018963968 != 100000000000000006/1000000000000000000.$ raku -v Welcome to Rakudo(tm) v2021.03. Implementing the Raku(tm) programming language v6.d. Built on MoarVM version 2021.03.
I've long been curious about the mindset that has created the rational/double arithmetic on raku, and I had thought (hoped) it might be a simple task to see how it all fits together.> say 3602879701896397/36028797018963968 == 0.100000000000000006e0; True > say 3602879701896397/36028797018963968 == 0.10000000000000001e0; True > say 3602879701896397/36028797018963968 == 0.1e0; True
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [Raku] Arcane treatment of doubles and rationals
by holli (Abbot) on Apr 04, 2021 at 12:59 UTC | |
by syphilis (Archbishop) on Apr 04, 2021 at 13:26 UTC | |
by holli (Abbot) on Apr 04, 2021 at 13:34 UTC |