Charles Greathouse on Tue, 18 Sep 2012 15:32:01 +0200

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

Re: forprime

I found forcomposite useful enough that I wrote a GP script to do it,
just for convenience's sake. I think for*** commands are useful and
would like to see more. (Sorry, Bill?)

Charles Greathouse
Case Western Reserve University

On Tue, Sep 18, 2012 at 4:16 AM, Pascal Molin <> wrote:
> Let's join the discussion on for loops:
> I do not think that forcomposite is really useful. Could forprimestep
> be merged with forprime
> using parameters ? I think we should keep the language small.
> What I would like to add is forpart (loop over partitions of an
> integer -- a dynamic version
> of the partition function).
> I have pushed  a branch for it (pascal-forpart) recently. In my opinion,
> forpart should also be able to loop over unordered decompositions of an integer
> (just n=x_1+...x_k) which is very useful and faster than discarding
> most of a forvec loop.
> I don't know if the latter deserves a dedicated 'forsum' iterator.
> Pascal Molin
> 2012/9/18  <>:
>> The one I use all the time is fordisc, loop over fundamental
>> discriminants (either positive or negative). Does that
>> already exist (hidden perhaps), and would it give problems
>> to Bill in gp2c? Of course by using isfundamental(), it is
>> easy to simulate.
>> Henri