Further to my delve in the scripts in ~addons/math/misc,  I've just noticed a
misleading comment in pollard.ijs .

The script offers implementations of two Pollard factorisation algorhithms.

The relevant comments are (with a bit of context):
NB. examples:
NB.
NB.    ]x=. (,*/) x: p: 1e7 30101
NB. 179424691 351599 63085541930909
NB.    pollardpm1 {: x
NB. 351599 335

Well - when you actually run it,  this is the result:

      ]x=. (,*/) x: p: 1e7 30101
179424691 351599 63085541930909
      pollardpm1 {: x
179424691 2556

Initially,  I thought this might be a bug,   but no.  The result in the
comment arises from the other function which does pollard rho
factorisation:
   pollardrho {: x
351599 335

Indeed,  we see that x is defined as the product of the factors found by
the two methods.

No doubt this little slip has been around for some years.

I suggest the comments be amended to read:

NB. examples:
NB.
NB.    ]x=. (,*/) x: p: 1e7 30101
NB. 179424691 351599 63085541930909
NB.    pollardpm1 {: x
NB. 179424691 2556
   et seq... (no changes needed)

Cheers,

Mike

--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to