On 2014-09-26 16:25, Peter Bruin wrote:
It would be a different
story if there were a significantly faster algorithm than to call
ispower() and ispseudoprime(), but that would first need to be demonstrated.
But why does that even matter? You agreed that the complexity of the implementation is a bad metric. And it's not because we cannot think of a more efficient algorithm right now that one won't be found tomorrow.


To answer your question: there are certainly negative examples (non-prime-powers) where a large difference can be seen:

gp> n = 6^10000000;
time = 167 ms.
gp> ispower(n)
time = 4,107 ms.
%2 = 10000000
gp> isprimepower(n)
time = 1 ms.
%3 = 0

In the positive case, I think both are the same.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to