mpn_div_q

Paul Zimmermann Paul.Zimmermann at loria.fr
Mon Sep 20 09:27:56 CEST 2010


>   in GMP 5.0.1, the mpf_div function uses a new MPN function mpn_div_q,
>   which is not documented, but exported in libgmp. I have two questions:
>   
>   * will mpn_div_q be part of the GMP API (i.e., be documented)?
>   
> In one form or another, it will.  I still hesitate about whether to make
> it have an itch interface (i.e., a scratch parameter).

it would be good to have at least a version without the itch interface
(which maybe should be called mpn_tdiv_q for coherence with mpn_tdiv_qr).

>   * does mpn_div_q guarantee to always return the correct (truncated) quotient
>     like mpn_tdiv_qr? Some random tests seem to indicate that it is the case.
>   
> Such semantics surely are intended, but as GMP comes without any
> warranty, I cannot guarantee it.  :-)

thanks.

Paul


More information about the gmp-devel mailing list