# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131718]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131718 >
Ranges with large Num end points still let .int-bounds to succeed, because
the .floor == $_ (or .Int == $_) check checks out. The real Int number,
however, has noise in it:
<Zoffix_> m: say (1e100..1e200).int-bounds
<camelia> rakudo-moar c76d93: OUTPUT:
«(10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104
9999999999999999697331222125103616594745032754550236264824175095034684843555407553419633840470625186802751241597388240818213573436827848463938504104723…»
This creates problems such as naive code like this successfully returns a sum.
It's a very noisy sum and isn't what a user[^1] expected:
<Zoffix_> m: say [+] 1..1e100
<camelia> rakudo-moar c76d93: OUTPUT:
«50000000000000001590289110975991817328705368083504703036502630629001320386155388099280879870478387696492219464257418736194801727938851902336988862645587616123664360879667548673664253072454494149672960»
I dunno, is the floating point noise something the user should be familiar with
or should we somehow go extra length to prevent such cases and error out or
something?
[1] https://irclog.perlgeek.de/perl6/2017-07-07#i_14841814