On 9/29/2011 7:40 AM,

mgrogue@... wrote:

> I've seen a flurry of posts on this. Which version of BPSW should I use in pfgw?

>

> Although it appears that the Pari-GP version is the best, it would be the

> hardest to implement. I've stated before that if someone wants to code it for

> pfgw, I would appreciate that. If any of the others are sufficient and require

> less effort (even though they might not be as fast), I would prefer that option.

>

> --Mark

Please feel free to use my version. If you are already using GMP in your code,

this should be an easy drop is set of functions for you.

If you are asking about the regular version or the strong version, then I can

tell you that there are no numbers < 2^64 that fool either version of the BPSW

test. I make this claim based on work by Jan Feitsma, which I later wrote

independent code to double check his work. So, for numbers < 2^64 you can use

the regular version of BPSW because every time it says composite, it is correct,

and every time it says prime or prp, that number will be prime.

If you are asking about the speed of the functions, then I'm not sure which

version because I haven't timed Tom Nicely's code, or Pari/GP's code against my

code.

-David C.