Re: div_qr_1 interface

2013-10-24 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: Basically qp = up won't work, but qp = up + k for any positive k will? Does the C code share that property? I think the C code has the same problem. Hmm, and it looks like in both the C and asm code, it's only the first iteration, before the main loop,

Re: A contribution to GMP

2013-10-24 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: We might want to re-phrase it somewhat, perhaps just consider - seriously consider, or even New projects should use mpfr since mpf is slower, less complete, and not actively developed. I guess in theory, mpf could be slightly faster than mpfr since

Re: A contribution to GMP

2013-10-24 Thread Vincent Lefevre
On 2013-10-24 10:01:32 +0200, Marc Glisse wrote: On Thu, 24 Oct 2013, Niels Möller wrote: I guess in theory, mpf could be slightly faster than mpfr since mpf doesn't make any effort to have precisely defined rounding. In that case I think it would be preferable to introduce a new don't care

Re: div_qr_1 interface

2013-10-24 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Torbjorn Granlund t...@gmplib.org writes: Basically qp = up won't work, but qp = up + k for any positive k will? Does the C code share that property? [...] I think it would be good to fix that, since it is surely a common usage scenario. I

Re: div_qr_1 interface

2013-10-24 Thread Torbjorn Granlund
I pushed initial C versions of these functions: mpn_div_qr_1n_pi2 mpn_div_qr_1u_pi2 I have had these for a long time, judging from the file time stamps. These accept n-limb dividends in a single consecutive operand and generate n-limb quotients also in a consecutive operand. I now