factorint and factor is not the same thing. factorint allows you to
specify various parameters for the factorisation. For example you can
select which of the various factorisation algorithms are used by Pari
to split your integer. You can also pass an integer to the factor
functions telling you up to what size you want to check for factors.

This is very likely what the primality proof test does. In particular
most efficient primality tests first try to find small factors by
trial factoring. If it finds any it can immediately declare the number
composite without doing an expensive primality proof. It is irrelevant
at this point whether the primes it is using are really prime. In fact
they all are because they are all very small.

But when you tell IFAC to find small factors, even if it finds none,
it declares the cofactors to be prime even though they probably
aren't, and issues a warning at certain debug levels. Only after you
have checked that the number is not obviously composite, e.g.
divisible by a prime less than 1000 do you go through the full
Pocklington test. Thus the full test only gets passed a number which
is relatively likely to be prime in the first place and hence not a
complete waste of time. Any number which then passes the Pocklington
test is certainly prime. The only way a number can fail to get to the
end of the test is if it is composite.

Bill.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to