Re: _ptr and _srcptr types

2018-05-19 Thread Vincent Lefevre
On 2018-05-19 23:27:30 +0200, Niels Möller wrote: > Vincent Lefevre writes: > > > I've just noticed that GMP provides mpz_inits, so that mpz_ptr is > > necessary: Since type checking cannot be done with variadic functions, > > one must provide types compatible with mpz_ptr,

Re: _ptr and _srcptr types

2018-05-19 Thread Niels Möller
Vincent Lefevre writes: > I've just noticed that GMP provides mpz_inits, so that mpz_ptr is > necessary: Since type checking cannot be done with variadic functions, > one must provide types compatible with mpz_ptr, or the behavior is > undefined. This is not an issue for

Re: mini-gmp mpz_{get,set}_d not fully compatible with GMP

2018-05-19 Thread Niels Möller
"Marco Bodrato" writes: > diff -r 41e50c4fdc46 bootstrap.c > --- a/bootstrap.c Wed May 16 08:36:03 2018 +0200 > +++ b/bootstrap.c Fri May 18 07:24:52 2018 +0200 > @@ -29,6 +29,7 @@ > see https://www.gnu.org/licenses/. */ > > > +#define DONT_USE_FLOAT_H 1 >

Re: _ptr and _srcptr types

2018-05-19 Thread Marc Glisse
On Mon, 14 May 2018, Torbjörn Granlund wrote: I've personally always used the mpz_ptr and mpz_srcptr in functions that take mpz arguments, taking the liberty to use this undocumented type. I suppose we could declare these. I'd like to hear from the rest of the GMP "core team". I am in

Re: mpq_get_d [Was: mini-gmp and mpq]

2018-05-19 Thread Marc Glisse
On Tue, 15 May 2018, Marco Bodrato wrote: Ciao Marc, Il Lun, 19 Febbraio 2018 5:24 pm, Marc Glisse ha scritto: On Mon, 19 Feb 2018, Marco Bodrato wrote: mpq_get_d currently gives a double, but rounded towards zero... Except when it uses the broken generic code :-( If you want, you can