Bill Allombert on Wed, 27 Jan 2016 20:03:26 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Precision in the PARI library (gp_read_str)


On Wed, Jan 27, 2016 at 03:23:41PM +0100, Karim Belabas wrote:
> Bill, how about exporting utility functions such as
> 
>   GEN
>   gp_read_str_bitprec(const char *s, long bitprec)
>   {
>     GEN x;
>     push_localbitprec(bitprec);
>     x = gp_read_str(s);
>     pop_localprec();
>     return x;
>   }
> 
>   GEN
>   gp_read_str_prec(const char *s, long prec)
>   { return gp_read_str_bitprec(s, prec2nbits(prec)); }

Sure.  We could also do it for closure_call*() function.
However it will be annoying to have three versions of everything.

Cheers,
Bill.