|Bill Allombert on Tue, 20 Jul 2004 11:48:40 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: API changes between 2.1 and 2.2.8|
On Mon, Jul 19, 2004 at 05:37:27PM +0200, Karim Belabas wrote: > I have updated COMPAT. Speaking of COMPAT, here my own file that should probably be merged. Thanks in advance, Bill PARI programming interface Changes between 2.1 and 2.3. 1) Fully compatible changes. These changes are not mandatory for your program to work with 2.3, but are likely to become mandatory in 2.4, so we advise you to update soon. 1.1) stack locations used to be of type "ulong", no they have a dedicated type, "pari_sp". 1.2) Variable numbers need to compared with the macro varncmp instead of < or > operators. 1.3) Access to the prime numbers table should be done via the macros NEXT_PRIME_VIADIFF or NEXT_PRIME_VIADIFF_CHECK. 2) Partially compatibles changes 2.1) t_POL no longer include an "effective length". lgef() and setlgef() are now aliases for lg() and setlg() repectively. 2.2) t_FRACN, t_RFRACN and gred() has been removed. They are now aliases to t_FRAC, t_RFRAC and gcopy(), respectively. 2.3) Direct access to the mantissa of t_INT is deprecated. Instead you should use the t_INT API (macros int_MSW, int_LSW, int_precW, int_nextW, int_W). This will ensure your code is compatible with the GMP kernel. 2.4) nfdivres and poldivres has been renamed to nfdivrem and poldivrem respectively. The old names are supported via macro. 2.5) permute and permuteInv have neen renamed to numtoperm and permtonum, respectively. The old names are supported via macro. 2.6) co8 was renamed to quadtoc. 3) Incompatibles changes. 3.1) A lot of error code has been removed. It is usually better to use only talker outside libpari. 3.2) Macro BITS_IN_RANDOM has been removed. Used to be 32. 3.3) hnfhavas has been removed, use hnflll instead. 3.4) bnfinit() output format has changed. 3.5) mymyrand() has been removed, use pari_rand31() or pari_rand() instead.