# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #112182]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112182 >


<moritz> p6: say (1 - 0.5**128) == 1
<p6eval> rakudo 8d4f0c, niecza v16-17-g648c49b: OUTPUT«True␤»
<p6eval> ..pugs: OUTPUT«␤»
<moritz> p6: say (1 - 0.5.FatRat**128) == 1
<p6eval> niecza v16-17-g648c49b: OUTPUT«False␤»
<p6eval> ..pugs: OUTPUT«*** No such method in class Rat: "&FatRat" [...]
<p6eval> ..rakudo 8d4f0c: OUTPUT«True␤»
<moritz> r: say (1 - 0.5.FatRat**128).WHAT
<p6eval> rakudo 8d4f0c: OUTPUT«FatRat()␤»
<moritz> r: say (1 - 0.5.FatRat**128).perl
<p6eval> rakudo 8d4f0c:
OUTPUT«FatRat.new(340282366920938463463374607431768211455,
340282366920938463463374607431768211456)␤»
<moritz> oh, infix:<==> converts to Num
<moritz> so, missing candidates. Easy to fix.
<dalek> rakudo/nom: 3218a72 | moritz++ | src/core/Rat.pm:
<dalek> rakudo/nom: ==-compare rats directly
<dalek> rakudo/nom:
<dalek> rakudo/nom: before we would go through Num, which made
(1-0.5.FatRat**128) == 1
<dalek> rakudo/nom: produce True, falsely
<dalek> rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3218a72091
<dalek> roast: 9d639e1 | moritz++ | S32-num/fatrat.t:
<dalek> roast: check that == for FatRat does not go through Num
<dalek> roast: review: https://github.com/perl6/roast/commit/9d639e19a9
<moritz> note that the other comparison operators still suffer from
the same problem
<masak> worth submitting a rakudobug over, you think?
<masak> I held back submitting the above one, because I had the
feeling that you were already fixing it ;)
<moritz> sure, submit away
* masak submits rakudobug

Reply via email to