Karim Belabas on Sat, 21 Jan 2006 15:26:52 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Missing functions in CVS |
* Ilya Zakharevich [2006-01-19 00:24]: > On Mon, Jan 16, 2006 at 06:38:51PM +0100, Karim Belabas wrote: > > * Ilya Zakharevich [2005-11-24 05:40]: > > > I'm trying to build Math::Pari with the CVS version, and I see that > > > some functions are missing. E.g., I can't find where is > > > > > > _gshift3() /* Available from 2.2.1 */ > > > > This one was removed because it was > > > > 1) incompatible with the GMP kernel > > How comes? GMP kernel still provides an integer as an array of words, > is not it? Yes, reversed. 'incompatible' was too strong: 'needed a thorough rewrite, painful to test completely given the specifications' would be more accurate. > > 3) not used anywhere, > > To the contrary, I expect it was used in about 90% of usages of PARI > as library (since - good or bad - Math::Pari is widely used for SSHing). I don't understand. You mean that 2-complement semantic for shifts of negative integers was intensively used in Math::Pari (or by its users) ? Can you give a realistic example ? > > and only catered for consistency with an alternative > > definition in a relatively minor case. > > "Relatively minor" is, of course, in eyes of a beholder. There are > two usages of left shift: as division by power of 2, and as operation > over bit arrays. You cut out the second usage. I do not think that > bitarray usage is "a relatively minor case". bitarrays cater for extreme efficiency, which the GP interpreter overhead essentially prevents. > > 4) easy to emulate at a minor efficiency cost. > > Compare with "1" and "2"; if it were so, why not make it such with GMP > kernel? What I meant was that for bitarray usage, bittest should be sufficient (at a minor efficiency cost, agreed). Karim. -- Karim Belabas Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]