TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
Could we get confirmation for that from @Larry. I remember $Larry
mentioning that Num fails over to Rat or so when necessary. IOW,
does

    my Rat $rat = 1/3; # assuming infix:</> returns a Rat
    my Num $num = 1/3;

    my Rat $diff = abs($rat - $num);

store a non-zero value in $diff? I assume that Num is discrete with a
binary representation and infix:<->:(Rat,Num-->Rat) converts $num to a
fraction with a power of two in the denominator. BTW, with floor
semantics I would expect $num < $rat.


I've not seen any detailed design for how those types interact. Whichever direction is the "promotion", the two values are unequal.


Reply via email to