• Tim Peters's avatar
    k_mul(): White-box testing turned up that (ah+al)*(bh+bl) can, in rare · d8b2173e
    Tim Peters authored
    cases, overflow the allocated result object by 1 bit.  In such cases,
    it would have been brought back into range if we subtracted al*bl and
    ah*bh from it first, but I don't want to do that because it hurts cache
    behavior.  Instead we just ignore the excess bit when it appears -- in
    effect, this is forcing unsigned mod BASE**(asize + bsize) arithmetic
    in a case where that doesn't happen all by itself.
    d8b2173e
longobject.c 59.5 KB