Pascal Molin on Tue, 18 Sep 2012 10:16:16 +0200

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

Re: forprime

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