Jean-Marie Madiot on Mon, 11 Jun 2012 14:26:03 +0200

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

Set prime limit

Dear all,

I know that I can set GP stack size both when launching gp and at runtime:

  $ gp -s 12345678
  ? allocatemem(12345678)

I don't know if it's a good idea, but it's quite handy.

1) Is it possible to do the same for the prime limit (i.e. to run the
sieve at runtime)?

2) Is it possible to access the prime limit at runtime?

3) Is it possible to access the stack size at runtime? (this is just
by curiosity though)

4) Would it be possible to have a forprime() function that goes beyond
the prime limit?

I have workaround that does (4), but I need to enter the prime limit
manually (then beyond the prime limit uses the slower isprime()) and I
need to duplicate my code, which is often not good. (I don't suppose
there is a preprocessor in GP, that's probably for the best.)

Thank you,

Jean-Marie Madiot