![]() |
A quick question regarding iterations in Mlucas...
My question is this: is it 10M+ iterations for a mersenne prime in the Mlucas code, or is more on the order of 2 ** (exponent tested) -1 / 2?
Anyone know? Ed |
The number of LL iterations to test a Mersenne number Mp (Mp = 2^p-1) is p-2. The number of decimal digits (10 million, or some such) has (almost) nothing to do with it.
Alex |
[quote=akruppa;99939]The number of LL iterations to test a Mersenne number Mp (Mp = 2^p-1) is p-2. The number of decimal digits (10 million, or some such) has (almost) nothing to do with it.
Alex[/quote] Unless you consider number of digits ~= number of iterations * log2 "something to do with it" :) |
That's why I wrote "almost". They are related by a constant factor, but if someone is asking about the actual number of iterations, then [I]p[/I]-2 is the proper answer, not the number of decimal digits, even though related by a constant factor.
It would be different if the question was "how does the number of iterations increase when the Mersenne number being tested increases?" Here it would make perfect sense to reply that it grows like the number of digits, because the question only asked for proportional growth. Alex |
I shall allow "almost" to excuse you:)
|
| All times are UTC. The time now is 06:14. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.