Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in.
Post a replyTopic review (newest first)
That is the fastest for an exact answer concerning primality. If you use the probabilistic RM and run through the algorithm say 15
darn.
Hi cal;
yeah. just testing if the number is prime
Depends what are you trying to do? Primality testing? What?
is there a better and faster method of testing?
Hi;
I think the bottleneck is the testing itself. Oh well. No matter. I'll eventually figure this out.
Hi cal;
yep, which is why i want to try to speed up the testing a bit
Hi,
no. i guess my comment was a bit vague Code: p = randint(3, 2**L)
p = q * (1 + p/q) + 1
while MillerRabin(p) == False: # prime = True, composite = False
p = p + qmiller rabin is not what im creating. rather, it is another function that im using to test my p values, and it is the probabilistic test.
Hi;
well the entire code block is just a pseudo code, but randint (which is also a legitimate command) is supposed to returns a random integer between a and b, inclusive. the real code is barely any different
Hi calccrypto; |