Skip to content
Permalink
main
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
# Try to convert list of <B1, B2, number_of_curves> to
# t40, t45, t50 progress
# updated gmp-ecm to print T20 by modifying these lines in ecm.c
# -#define DIGITS_START 35
# +#define DIGITS_START 20
# -#define DIGITS_END 80
# +#define DIGITS_END 60
# References:
# https://members.loria.fr/PZimmermann/records/ecm/params.html
# https://www.rieselprime.de/ziki/Elliptic_curve_method
# https://www.mersenne.org/report_ecm/
def progress_v1(curves):
# https://www.mersenne.org/report_ecm/
expected_effort = {
20: (11000, 100),
25: (50000, 280),
30: (250000, 640),
35: (1000000, 1580),
40: (3000000, 4700),
45: (11000000, 9700),
50: (44000000, 17100),
55: (110000000, 46500),
60: (260000000, 112000),
65: (800000000, 360000),
}
completed = []
for digits, (min_B1, needed) in expected_effort.items():
complete = 0.0
for B1, B2, count in curves:
if B1 >= min_B1 and B2 >= 20 * min_B1:
complete += count / needed
if complete > 0.001:
completed.append((digits, complete))
status = []
for digits, effort in completed:
status.append("t{} x {}".format(digits, round(effort, 3)))
print (" ".join(status))
return completed
def progress_v2(curves):
# Uses more complicated ECM table
# See https://www.mersenneforum.org/showpost.php?p=575452&postcount=595
curve_data = [[120, 50000000, 468346], [1000, 1000000, 4504, 661846], [47000, 4700000, 32, 365, 6094, 136696, 3916536], [49000, 4900000, 31, 350, 5735, 126343, 3551628], [50000, 11760000, 24, 266, 4191, 89221, 2457784], [50000, 13428460, 24, 257, 4043, 85847, 2359279], [50000, 13775590, 24, 255, 4004, 85847, 2333130], [50000, 14400000, 23, 253, 3964, 84942, 2307195], [50000, 4550000, 31, 352, 5729, 125365, 3497777], [50000, 4750000, 31, 347, 5656, 123649, 3447438], [50000, 50000, 203, 3356, 74785, 2123635], [50000, 500000, 59, 723, 12592, 289922, 8424326], [50000, 5000000, 31, 343, 5570, 121642, 3388537], [50000, 50000000, 18, 189, 2902, 60068, 1615275], [50000, 5100000, 30, 341, 5537, 120887, 3365934], [50000, 6350000, 29, 321, 5192, 112854, 3131368], [50000, 6400000, 29, 321, 5181, 112577, 3123266], [50000, 6450000, 29, 320, 5169, 112304, 3115255], [50000, 6650000, 29, 317, 5123, 111252, 3084562], [50000, 6700000, 29, 317, 5113, 110993, 3076973], [50000, 6750000, 29, 316, 5102, 110737, 3069464], [50000, 6800000, 28, 316, 5091, 110495, 3062033], [51000, 5000000, 30, 337, 5446, 117963, 3257962], [51000, 5100000, 30, 336, 5414, 117217, 3236755], [60000, 6000000, 27, 285, 4307, 87077, 2237173], [65000, 5000000, 28, 283, 4171, 82040, 2044619], [65000, 6500000, 26, 263, 3860, 75521, 1874080], [70000, 7300000, 25, 243, 3452, 65496, 1574523], [74000, 7400000, 24, 233, 3247, 60293, 1416699], [76620, 10000000, 21, 203, 2757, 49987, 1162083], [76620, 15000000, 20, 184, 2478, 44582, 1017614], [76620, 23259610, 18, 165, 2193, 39100, 885657], [76620, 24176890, 18, 163, 2172, 38699, 876077], [76620, 26954350, 18, 161, 2131, 37904, 857126], [80000, 8000000, 22, 207, 2794, 50047, 1133627], [100000, 10000000, 20, 171, 2124, 34994, 725930], [100000, 13600000, 18, 158, 1945, 31835, 656971], [100000, 14200000, 18, 156, 1925, 31477, 649200], [199900, 19990000, 14, 98, 971, 12639, 202436, 3952595], [250000, 129632592, 9, 57, 506, 5876, 86052, 1506583], [250000, 25000000, 12, 83, 769, 9243, 137840, 2499542], [250000, 30000000, 12, 80, 736, 8924, 132844, 2374662], [250000, 30050537, 12, 80, 736, 8924, 132844, 2374662], [250000, 30419426, 12, 80, 736, 8821, 131215, 2374662], [250000, 32616915, 12, 79, 722, 8640, 128355, 2290730], [250000, 37170685, 12, 76, 700, 8351, 123841, 2206800], [250000, 38060828, 12, 76, 700, 8351, 123841, 2206799], [250000, 38075084, 12, 76, 700, 8351, 123841, 2206799], [250000, 38104631, 12, 76, 700, 8351, 123841, 2206799], [250000, 38123960, 12, 76, 700, 8351, 123841, 2206799], [250000, 38141102, 12, 76, 692, 8351, 123841, 2206799], [250000, 38172094, 12, 76, 692, 8351, 123841, 2206799], [250000, 38253153, 12, 76, 692, 8351, 123841, 2206799], [250000, 38299066, 12, 76, 692, 8351, 123841, 2206799], [250000, 38317896, 12, 76, 692, 8351, 123841, 2206799], [250000, 38357144, 12, 76, 692, 8351, 123841, 2206799], [250000, 38500000, 12, 76, 692, 8257, 123841, 2206799], [250000, 38750000, 12, 76, 692, 8257, 122367, 2206798], [250000, 50000000, 11, 72, 653, 7756, 114525, 2033638], [445657, 50000000, 10, 55, 437, 4454, 55136, 823853], [500000, 500000, 39, 314, 3249, 41092, 616244], [1000000, 1000000, 27, 186, 1618, 17025, 210734, 3000162], [1000000, 10000000, 12, 63, 443, 3819, 39590, 490166, 6836654], [1000000, 100000000, 7, 35, 225, 1837, 18454, 216662, 2938408], [2100100, 200100100, 6, 25, 136, 951, 7909, 77935, 870800], [2500000, 250000000, 6, 23, 122, 812, 6518, 61211, 658630, 7987143], [3000000, 100000000, 6, 26, 138, 902, 7114, 64499, 676319, 7980511], [3000000, 1000000000, 4, 16, 82, 518, 3898, 34668, 350675, 4038400], [3000000, 3000000, 17, 92, 630, 5157, 49098, 532418, 6473717], [3000000, 300000000, 5, 21, 108, 691, 5353, 48467, 496235, 5793368], [3000000, 4592487916, 4, 13, 63, 382, 2833, 24736, 246684, 2801813], [4000000, 400000000, 5, 19, 91, 550, 4003, 33534, 324335, 3526972], [6000000, 600000000, 5, 16, 72, 408, 2743, 21391, 187556, 1864970], [11000000, 100000000000, 2, 7, 25, 115, 645, 4232, 31733, 265903, 2483358], [11000000, 11000000, 10, 47, 253, 1619, 11896, 98615, 908942, 9206747], [11000000, 110000000, 6, 20, 90, 484, 3042, 21535, 174626, 1574156], [11000000, 1100000000, 4, 12, 51, 256, 1532, 10599, 83100, 727689, 6968777], [11000000, 30114149530, 3, 8, 29, 139, 797, 5306, 40264, 340600, 3211083], [11000000, 36578884662, 3, 7, 28, 134, 766, 5084, 38271, 325095, 3059329], [23000000, 23000000, 8, 34, 163, 923, 5979, 43460, 349652, 3078677], [23000000, 81050459506, 2, 6, 21, 88, 446, 2601, 17130, 126770, 1035215], [25000000, 2500000000, 3, 10, 35, 158, 824, 4932, 33295, 249808, 2059209], [30000000, 3000000000, 3, 9, 33, 143, 724, 4201, 27456, 199225, 1603509], [41000000, 4100000000, 3, 8, 29, 121, 592, 3274, 20367, 140389, 1060527], [42000000, 4200000000, 3, 8, 29, 120, 581, 3213, 19961, 137408, 1036544], [43000000, 198654756318, 2, 5, 16, 62, 281, 1486, 8872, 58618, 428760], [43000000, 4300000000, 3, 8, 29, 119, 571, 3153, 19563, 133030, 1002120], [44000000, 100000000000, 2, 5, 17, 67, 306, 1619, 9642, 64226, 467628], [44000000, 223505479902, 2, 5, 16, 61, 277, 1451, 8589, 56963, 412802], [44000000, 44000000, 7, 26, 115, 591, 3461, 22644, 163350, 1286065], [44000000, 4400000000, 3, 8, 28, 115, 555, 3025, 18705, 126976, 944182], [48000000, 251426235076, 2, 5, 15, 58, 259, 1344, 7887, 51167, 367373], [48000000, 279380917212, 2, 5, 15, 57, 258, 1328, 7787, 50828, 362341], [48000000, 297984687018, 2, 5, 14, 54, 242, 1251, 7268, 47237, 336176], [48000000, 298483725556, 2, 5, 14, 54, 242, 1245, 7268, 47237, 336176], [107000000, 10700000000, 3, 7, 20, 74, 314, 1509, 8172, 48374, 315352], [109000000, 10900000000, 3, 7, 20, 73, 312, 1496, 8023, 47423, 308791], [110000000, 100000000000, 2, 5, 14, 50, 206, 964, 5058, 29344, 186277], [110000000, 1000000000000, 2, 4, 11, 36, 144, 660, 3391, 19336, 120877], [110000000, 110000000, 6, 19, 74, 337, 1732, 9904, 62176, 424287, 3122228], [110000000, 11000000000, 3, 7, 20, 73, 309, 1483, 7949, 47383, 305568], [110000000, 776278396540, 2, 4, 11, 38, 151, 692, 3583, 20479, 128305], [111000000, 11100000000, 3, 7, 20, 73, 309, 1483, 7945, 46918, 302368], [113000000, 11300000000, 3, 7, 20, 72, 304, 1458, 7799, 45997, 296053], [160000000, 1288647750406, 2, 4, 10, 32, 121, 525, 2570, 13923, 82560], [190000000, 2383889958466, 2, 3, 9, 28, 106, 448, 2143, 11341, 65297], [260000000, 1000000000000, 2, 4, 9, 29, 105, 433, 2000, 10258, 57131], [260000000, 10000000000000, 2, 3, 7, 22, 78, 315, 1427, 7164, 39324], [260000000, 260000000, 5, 14, 51, 211, 973, 4969, 27756, 167887, 1091330], [260000000, 26000000000, 2, 5, 15, 50, 189, 820, 3917, 20557, 117362], [800000000, 80000000000, 2, 4, 11, 33, 114, 428, 1797, 8257, 41066], [850000000, 14142901172416, 2, 3, 6, 17, 52, 186, 745, 3254, 15475], [900000000, 90000000000, 2, 4, 11, 32, 109, 408, 1677, 7593, 37199], [999999999, 99999999900, 2, 4, 11, 31, 101, 373, 1534, 6844, 33009]]
completed = []
for digits in [20,25,30,35,40,45,50,55,60]:
index = 2 + (digits - 20) // 5
complete = 0
for B1, B2, count in curves:
best = 0.0
for row in curve_data:
if B1 >= row[0] and B2 >= row[1] and index < len(row):
best = max(best, count / row[index])
complete += best
if complete > 0.001:
completed.append((digits, complete))
status = []
for digits, effort in completed:
status.append("t{} x {}".format(digits, round(effort, 3)))
print (" ".join(status))
return completed
# Simple cases t20 x 1, t25 x 2, t35 x 0.5
answer = progress_v1([(11000, 11000 * 100, 100)])
assert answer[0] == (20, 1.0), answer
# t20 x 1.0
answer = progress_v1([(50000, 50000 * 82, 200), (50001, 50000 * 85, 80)])
assert answer[1] == (25, 1.0), answer
# t20 x 2.8 t25 x 1.0
answer = progress_v1([(10 ** 6, 10 ** 9, 700), (10 ** 7, 10 ** 9, 90)])
assert answer[3] == (35, 0.5), answer
assert answer[4] == (40, 90 / 4700), answer
# t20 x 7.9 t25 x 2.821 t30 x 1.234 t35 x 0.5 t40 x 0.019
# B1=B2 doesn't qualify as t45 (or t35)
answer = progress_v1([(11000000, 11000000, 9700)])
assert answer[2] == (30, 9700 / 640)
assert len(answer) == 3
# t20 x 97.0 t25 x 34.643 t30 x 15.156
print()
print("v2 calculations")
progress_v1([(11000, 11000 * 100, 100)])
progress_v2([(50000, 50000 * 82, 200), (50001, 50000 * 85, 80)])
progress_v2([(10 ** 6, 10 ** 9, 700), (10 ** 7, 10 ** 9, 90)])
progress_v2([(11000000, 11000000, 9700)])
# https://www.mersenne.ca/exponent/22787
print()
print("M22787 2021/07/29")
curves = [
(1000000,100000000,760),
(3000000,300000000,1378),
(11000000,1100000000,738),
(11000000,35133391030,676),
(43000000,240490660426,296),
]
progress_v1(curves)
progress_v2(curves)