two possible coding porjects

Torbjorn Granlund
05 Aug 2003 00:29:19 +0200 writes:

  Quoting Karl Hasselström <>:
  > That is, you call a function that may or may not preinvert
  > your divisor depending on how big it is, how many operations
  > you'll do, etc.

  OK, as long as there is a provision for telling it the number
  of expected operations is very very large.

I think we'll use 0 as an approximation of infinity.
I.e.,  mpz_preinv_divisor (inv_a, a, 0)  will be used
in such cases.

  Pollard Rho spends a long time computing modular squares
  against an invariant divisor that can be presumed to be
  largish, for example.  There is no way to know (without already
  knowing the factorization) how many times it will use the

Is that possible?  So how many times will the divisor be used for
factoring 87029875480922160292881764593?  The factorization is
40075522721471*2171646670357583.  ;-)

  In interactive programs it is also difficult to know in advance
  how many times a divisor will be used.  If the shell notices that
  some number is being used as the size of a ring it ought to be
  able to cache an inverse for it without a lot of drama.

Are you suggesting some clever enhancements to GNU bash?