# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #123570]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=123570 >
<masak> r: say 6103515625/5; say ((((6103515625/5) * 4 + 123327057) **
2) % 6103515625); say (((1220703125 * 4 + 123327057) ** 2) %
6103515625)
<camelia> rakudo-{parrot,moar} c5dcdf: OUTPUT«122070312506103515624»
<masak> ok -- between those three expressions, something is quite wrong.
<masak> note that the third is just the second but with the evaluated
result from the first inserted.
<masak> the second and the third should show up the same.
* masak submits rakudobug
<FROGGS_> m: say ((((6103515625 / 5) * 4 + 123327057) ** 2) % 6103515625)
<camelia> rakudo-moar c5dcdf: OUTPUT«0»
<FROGGS_> m: say ((((6103515625 div 5) * 4 + 123327057) ** 2) % 6103515625)
<camelia> rakudo-moar c5dcdf: OUTPUT«6103515624»
<masak> FROGGS_: you're implying I'm suffering from bignum/rounding effects?
<FROGGS_> I'm implying nothing atm
< masak> anyway, FROGGS_++ for interesting data point. that goes in
the ticket, too.
<FROGGS_> m: say ((((6103515625 / 5).Int * 4 + 123327057) ** 2) % 6103515625)
<camelia> rakudo-moar c5dcdf: OUTPUT«6103515624»
<FROGGS_> m: say ((((6103515625 div 5).Num * 4 + 123327057) ** 2) % 6103515625)
<camelia> rakudo-moar c5dcdf: OUTPUT«0»
<FROGGS_> :o)