# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #128176]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128176 >


When given a lazy list as the argument, .polymod divides until the original 
number given by the invocant reaches zero. That works when the lazy list is 
infinite, but when it isn't, we lose the final remainder. This affects both the 
Int and Real implementations. Here's a sample program demonstrating the issue:

    say 42.polymod:      2, 3;
    say 42.polymod: lazy 2, 3;
    
    say 42.Rat.polymod:      2, 3;
    say 42.Rat.polymod: lazy 2, 3;
    
    # OUTPUT:
    # (0 0 7)
    # (0 0)
    # (0 0 7)
    # (0 0)

Reply via email to