Paul Zimmermann <paul.zimmerm...@inria.fr> writes: > Dear Niels, > >> The excluded case, >> >> sub_ddmmss(ah, al, bh, /*compile time constant*/0) >> >> could clearly be optimized, in a different way, but I'd guess it's rare >> enough in real code to not be worth the effort?
Sorry for being unclear, sub_ddmmss has six arguments, and the case I wanted to single out was sub_ddmmss(rh, rl, ah, al, bh, /*compile time constant*/0) > in MPFR we have 15 places where we call sub_ddmmss, among which 8 have bl=0: Those seem to have al == 0 (in above notation), which is a different case. sub_ddmmss (rh, rl, ah, 0, bh, bl) should be the same as rh = ah - bh - (bl > 0); rl = -bl; So we have a borrow to propagate except of also bl == 0, and hence some runtime carry logic is needed. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs