Interface inconsistency in GMP and MPFR

Jacek Blaszczynski jacek.blaszczynski at acn.waw.pl
Sat Jul 17 19:15:17 CEST 2004


Hello !

Thanks for reply - glad to know it will be there.

Jacek 

-----Original Message-----
From: Patrick Pelissier [mailto:Patrick.Pelissier at loria.fr] 
Sent: Friday, July 16, 2004 11:04 AM
To: Jacek Blaszczynski
Cc: mpfr at loria.fr
Subject: Re: Interface inconsistency in GMP and MPFR

Hello,

 I planned to add mpfr_init_XXXX as functions, but keeping then as macros
(just like mpfr_get_emax):

int mpfr_init_set (mpfr_t rop, mpfr_t op, mp_rnd_t rnd);  [...] #define
mpfr_init_set(x, y, rnd) \  ( mpfr_init(x), mpfr_set((x), (y), (rnd)) )

 Sincerely,
  Patrick Pelissier


On Thu, Jul 15, 2004 at 12:41:32 +0200, Jacek Blaszczynski wrote:
> Hello! 
> 
> I have run across one inconsistency in MPFR nad GMP libraries, namely, 
> combined initialization and assignemnt routines are implemented as 
> functions in GMP while they equivalents are macros in MPFR i.e. int 
> mpfr_init_set (mpfr_t rop, mpfr_t op, mp_rnd_t rnd) vs. void 
> mpf_init_set (mpf_t rop, mpf_t op) .
> Obviously this leads to several problems while calling this interface.
> 
> Are there any plans to have it implemented consistently across both 
> libraries?
> 
> Jacek
> 



More information about the gmp-discuss mailing list