Rare numbers: Difference between revisions

m
→‎{{header|C#}}: updated output to 19 digits, edited performance remarks
m (promoted draft task to a (full) task.)
m (→‎{{header|C#}}: updated output to 19 digits, edited performance remarks)
Line 125:
}</lang>
{{out}}
Results from a core i7-7700 @ 3.6Ghz. This C# version isn't as fast as the Go version using the same hardware. C# computes up to 17, 18 and 19 digits in under 9 minutes, (Go1 is2/3 abouthours 6and minutes).over 2 The1/2 '''''long'''-to-'''ulong'''''hours conversionrespectively. isn't causing the reduced performance, C# has more overhead as compared to (Go. Thisis C#about version6 canminutes, easily1 be1/4 converted to use BigIntegers to go beyond 19 digitshours, butand becomesunder around2 eight times slowerhours). (ugh!)
 
<pre style="height:64ex;overflow:scroll"> digs elapsed(ms) R/N Unordered Rare Numbers
The '''''long'''-to-'''ulong''''' conversion isn't causing the reduced performance, C# has more overhead as compared to Go. This C# version can easily be converted to use BigIntegers to go beyond 19 digits, but becomes around eight times slower. (ugh!)
28 1 (65)
<pre style="height:64ex;overflow:scroll"> digs elapsed(ms) R/N Unordered Rare Numbers
2 29
3 29 27 1 (65)
2 28 1 (65)
23 2928
4 29
5 29
3029 2 (621,770)
6 3029
7 30
8 34
3534 3 (281,089,082)
9 36
3736 4 (2,022,652,202)
61 5 (2,042,832,002)
10 116121
11 175176
450448 6 (872,546,974,178)
483481 7 (872,568,754,178)
935 8 (868,591,084,757)
12 1,224232
1,547577 9 (6,979,302,951,885)
13 2,053087
6,214274 10 (20,313,693,904,202)
6,291351 11 (20,313,839,704,202)
78,947039 12 (20,331,657,922,202)
8,199292 13 (20,331,875,722,202)
89,898000 14 (20,333,875,702,202)
21,287212 15 (40,313,893,704,200)
21,444365 16 (40,351,893,720,200)
14 23,985898
2423,051964 17 (200,142,385,731,002)
24,295198 18 (221,462,345,754,122)
27,423241 19 (816,984,566,129,618)
2928,052834 20 (245,518,996,076,442)
29,294074 21 (204,238,494,066,002)
29,369147 22 (248,359,494,187,442)
29,698476 23 (244,062,891,224,042)
35,723481 24 (403,058,392,434,500)
35,966721 25 (441,054,594,034,340)
15 38,517231
92,890116 26 (2,133,786,945,766,212)
114113,173469 27 (2,135,568,943,984,212)
117116,490787 28 (8,191,154,686,620,818)
120119,349647 29 (8,191,156,864,620,818)
121120,606912 30 (2,135,764,587,964,212)
123122,449735 31 (2,135,786,765,764,212)
127,882126 32 (8,191,376,864,400,818)
142141,589793 33 (2,078,311,262,161,202)
180179,807832 34 (8,052,956,026,592,517)
185184,714647 35 (8,052,956,206,592,517)
222221,640279 36 (8,650,327,689,541,457)
225223,114721 37 (8,650,349,867,341,457)
226225,926520 38 (6,157,577,986,646,405)
274273,632238 39 (4,135,786,945,764,210)
314312,875969 40 (6,889,765,708,183,410)
16 318316,242349
324322,777961 41 (86,965,750,494,756,968)
325323,772958 42 (22,542,040,692,914,522)
506502,383805 43 (67,725,910,561,765,640)
17 523519,467583
576,058 44 (284,684,666,566,486,482)
707,530 45 (225,342,456,863,243,522)
756,188 46 (225,342,458,663,243,522)
856,346 47 (225,342,478,643,243,522)
928,546 48 (284,684,868,364,486,482)
1,311,170 49 (871,975,098,681,469,178)
2,031,664 50 (865,721,270,017,296,468)
2,048,209 51 (297,128,548,234,950,692)
2,057,281 52 (297,128,722,852,950,692)
2,164,878 53 (811,865,096,390,477,018)
2,217,508 54 (297,148,324,656,930,692)
2,242,999 55 (297,148,546,434,930,692)
2,576,805 56 (898,907,259,301,737,498)
3,169,675 57 (631,688,638,047,992,345)
3,200,223 58 (619,431,353,040,136,925)
3,482,517 59 (619,631,153,042,134,925)
3,550,566 60 (633,288,858,025,996,145)
3,623,653 61 (633,488,632,647,994,145)
4,605,503 62 (653,488,856,225,994,125)
5,198,241 63 (497,168,548,234,910,690)
18 6,028,721
6,130,826 64 (2,551,755,006,254,571,552)
6,152,283 65 (2,702,373,360,882,732,072)
6,424,945 66 (2,825,378,427,312,735,282)
6,447,566 67 (8,066,308,349,502,036,608)
6,677,925 68 (2,042,401,829,204,402,402)
6,725,119 69 (2,420,424,089,100,600,242)
6,843,016 70 (8,320,411,466,598,809,138)
7,161,527 71 (8,197,906,905,009,010,818)
7,198,112 72 (2,060,303,819,041,450,202)
7,450,028 73 (8,200,756,128,308,135,597)
7,881,502 74 (6,531,727,101,458,000,045)
9,234,318 75 (6,988,066,446,726,832,640)
19 9,394,513
 
The 4375 rare numbers with up to 1719 digits are:
1: 65
2: 621,770
Line 230 ⟶ 266:
41: 22,542,040,692,914,522
42: 67,725,910,561,765,640
43: 86,965,750,494,756,968</pre>
44: 225,342,456,863,243,522
I will revise this output when it completes the 19 digit run.
45: 225,342,458,663,243,522
46: 225,342,478,643,243,522
47: 284,684,666,566,486,482
48: 284,684,868,364,486,482
49: 297,128,548,234,950,692
50: 297,128,722,852,950,692
51: 297,148,324,656,930,692
52: 297,148,546,434,930,692
53: 497,168,548,234,910,690
54: 619,431,353,040,136,925
55: 619,631,153,042,134,925
56: 631,688,638,047,992,345
57: 633,288,858,025,996,145
58: 633,488,632,647,994,145
59: 653,488,856,225,994,125
60: 811,865,096,390,477,018
61: 865,721,270,017,296,468
62: 871,975,098,681,469,178
63: 898,907,259,301,737,498
64: 2,042,401,829,204,402,402
65: 2,060,303,819,041,450,202
66: 2,420,424,089,100,600,242
67: 2,551,755,006,254,571,552
68: 2,702,373,360,882,732,072
69: 2,825,378,427,312,735,282
70: 6,531,727,101,458,000,045
71: 6,988,066,446,726,832,640
72: 8,066,308,349,502,036,608
73: 8,197,906,905,009,010,818
74: 8,200,756,128,308,135,597
75: 8,320,411,466,598,809,138</pre>
 
=={{header|F_Sharp|F#}}==