----- Original Message Follows -----
From: Raul Miller <[email protected]>
To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] perfect power???
Date: Mon, 8 Jun 2009 18:25:25 -0400
 
>On Mon, Jun 8, 2009 at 6:13 PM,
>> <[email protected]> wrote: From what I am
>> read in this article, determing if a number is a "Perfect
>> Power" should be a lot faster.  Either that or I am
>> totally mis-reading the article.
>
>Determining if a number is a perfect power is certainly
>faster than some algorithm for determining if a number
>is prime.
 
I would agree.
>
>But do you have any reason to believe J uses that
>algorithm, in its implementation of q?
 
no
 
>
>That said, 1 p: will determine whether or not a number
>is prime, and might be faster than 1 = # q: in some
>cases.
>
 
I was only using 1= #q: as an way to explain my thoughts.
 
If "perfect power" aka pp returns 0/1 indicating that a
number is a perfect power in the same
time as 1= # q: or 1 p: then it is too slow to use as the
first step in the AKS primality test.
 
By the way, my discussion about "perfect power" is simply my
attempt to:
 
1. improve my limited J knowledge.
2. Attempt  to re-implement the AKS primality algorithm in
J.
 
I did  think "Detecting Perfect Powers in Essentially Linear
Time" would give me a fast routine.
I guess it rather means,  it would in be the fastest
implementation
in that particular language whether it the language is Java,
C/C++, matlab or J. 

Am I wrong in thinking this?

By the way, I bow to your superior J and math knowledge.  I
am not trying to beat anybody up.

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

Reply via email to