Charles Greathouse on Tue, 26 Jul 2011 10:03:24 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [sage-devel] Sage & Pari |
> We badly need feedback at a higher level, from developpers or would-be > developpers, regarding the features they think are lacking in Pari, and > are preventing them from developping in Pari the way they would like to. I have some thoughts. 1. Let forprime() take large arguments. 2. New types, possibly "special" types as in TODO: t_FACTORED and maybe t_FILE and t_BITS (bit array -- hard to implement efficiently in GP) 3. New loop forfactored that uses a sieve to factor all the numbers from a to b. Equivalent to for(k=a,b,n=factor(k); closure(n)) but faster. (Useful for evaluating number-theoretic functions over large ranges.) 4. Lambert's W. 5. Ability to read from arbitrary files, as opposed to reading a file as a GP script 6. Recognizing cyclotomic polynomials and products of same 7. Extension of squarerootint to other roots, including library versions for ulongs. 8. Let primepi() take large arguments (various algorithms are possible). I have a working version of #1 which takes two approaches: for wide intervals it uses a segmented sieve and for narrow intervals it removes small factors and tests primality (as suggested in TODO). I'd be happy to share the code, though perhaps it would be better to take code from one of the GPL-compatible fast sieves out there. I also have code for #4, though a better version would increase precision incrementally, roughly doubling performance. I'm working on #6 using the Bradford-Davenport algorithm. Generally, I have 5700 lines of C/PARI code which I'd be happy to share but I'm not sure how much of it you would find useful. (Would anyone want an optimized function for finding terms of Stern's diatomic series, Jeff Erickson's algorithm for finding maximal arithmetic progressions, or normally-distributed random numbers?) Charles Greathouse Analyst/Programmer Case Western Reserve University