Ilya Zakharevich on Fri, 15 Dec 2023 02:49:04 +0100


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

Re: libpari precision handling changes


On Sun, Dec 03, 2023 at 09:52:55PM +0100, Bill Allombert wrote:
> Dear PARI developers,
> 
> I committed a change to the way the precision is manipulated in the 
> C library.
> 
> Now the precision is a multiple of BITS_IN_LONG.

This is a major backwards-incompatible change.  Should not it better
be handled by introducing new names for macros and functions?  

> DEFAULTPREC is 64      (instead of 3)
> MEDDEFAULTPREC is 128  (instead of 4)
> BIGDEFAULTPREC is 192  (instead of 5)

Like bDEFAULTPREC etc?

> the prototype code 'p' of 'install' passes a number of bits

Is not there the code 'b' for this?  Why not use it?!

> so every function that
> takes the argument prec, will receive a number of bits etc.

I would much prefer that these functions are renamed (appending 'b' to
the name) and their prototype changed to 'b'…  In my experience, this
is the path of lest resistance in the long run!

Hope this helps,
Ilya