Somewhere I write that the primary orbit of w32's length is 13.603.546.275 iterations.
Well, I don't know what happened. I'm testing again with another program right now and this number is far exceeded:
Step 3423.088.934.912 : X=889508404, Y=3377359528, C=1
I'm also testing w32+ simultaneously: it uses 64-bit registers and the carry is simply the MSB shifted back to the LSB... it's pretty wild!
I adapted the scanning program to handle 64-bit data. When working with w63, -DNOMASK saves 25% of the computation time and the result looks as good.
20241002:
Computing further (about 27h) gives these results :
- w32 masked:
Step 127242701111296 : X=486058137, Y=1452857267, C=1 Step 127246996078592 : X=57168942, Y=2026275220, C=1 Step 127251291045888 : X=2130391839, Y=3854448558, C=1 Step 127255586013184 : X=3974460549, Y=1367440861, C=0 Step 127259880980480 : X=4171287861, Y=349814740, C=0 Step 127264175947776 : X=1548631083, Y=2991865890, C=1 Step 127268470915072 : X=635132602, Y=3437845154, C=1 Step 127272765882368 : X=2468530850, Y=365303063, C=0 ^C 99801.70user 7.42system 27:43:43elapsed 99%CPU
- w32 nomask:
Step 127783866990592 : X=1857706233519333428, Y=6363298141668173779, C=432530938 Step 127788161957888 : X=10278906262506799708, Y=11191247221860114708, C=2393244361 Step 127792456925184 : X=17161298025364128903, Y=3297960277882192750, C=3995676065 Step 127796751892480 : X=10933138637106185040, Y=14836593303031674861, C=2545569706 Step 127801046859776 : X=1746085887977577584, Y=4191515253591217683, C=406542301 Step 127805341827072 : X=9757511789714895600, Y=5605426172831249234, C=2271847750 Step 127809636794368 : X=18277385174601529875, Y=5102702571660683175, C=4255535354 Step 127813931761664 : X=11054218837186404983, Y=17005938597805104479, C=2573760886 Step 127818226728960 : X=8927644014085209424, Y=8319196262501969693, C=2078629102 Step 127822521696256 : X=7085261420112952104, Y=6817447390030532634, C=1649665976 Step 127826816663552 : X=6780497954159397175, Y=14411798433420106112, C=1578707702 ^C 100167.06user 5.81system 27:49:45elapsed 99%CPU
- w63 masked (classic):
Step 98187247353856 : X=7789805987906940537, Y=8997492253897967197, C=1 Step 98191542321152 : X=6219391496852744986, Y=2932353114636017441, C=0 Step 98195837288448 : X=3513660373162068975, Y=5583561552522910818, C=1 Step 98200132255744 : X=5464065101111839226, Y=6559200458595146488, C=1 Step 98204427223040 : X=1704903053962015866, Y=689819550266971419, C=0 Step 98208722190336 : X=5773997793067942377, Y=1739895575921382638, C=0 Step 98213017157632 : X=8265381472875106818, Y=112466157831344603, C=0 Step 98217312124928 : X=8866559370984867717, Y=1274529812375955528, C=0 Step 98221607092224 : X=2616865902061394463, Y=2296577278457820939, C=0 Step 98225902059520 : X=4885176899669488212, Y=5742267305191855321, C=1 Step 98230197026816 : X=5923363790209385457, Y=6818607223108001127, C=1 ^C 101740.10user 5.92system 28:15:59elapsed 99%CPU
- w63 nomask:
Step 129712307306496 : X=13898979293651408146, Y=10471030960484516614, C=1 Step 129716602273792 : X=15651397243760147896, Y=6773005075823389117, C=1 Step 129720897241088 : X=17954653194078123381, Y=16120148392752158639, C=1 Step 129725192208384 : X=198529025183803037, Y=13573698087745720944, C=0 Step 129729487175680 : X=11965111940566923107, Y=14889642454769736172, C=1 Step 129733782142976 : X=6123098105022721077, Y=15600159587929872239, C=0 Step 129738077110272 : X=9623131821115452626, Y=7793938344049970617, C=1 Step 129742372077568 : X=5460162401730428220, Y=481501917958797404, C=0 Step 129746667044864 : X=364843809283491869, Y=16020168061567238065, C=0 Step 129750962012160 : X=18379832403448125132, Y=9352390193144058009, C=1 Step 129755256979456 : X=3070579473553777869, Y=11817703077574477677, C=0 Step 129759551946752 : X=4276236740962303982, Y=2211040804269366145, C=0 Step 129763846914048 : X=15164859771112835864, Y=11754352737906713717, C=1 ^C 101738.11user 5.51system 28:15:56elapsed 99%CPU
Apparently, due to some coding/compiler mystery, the masked w63 is slower than the unmasked (a 3:4 ratio). The w32s are about as fast as nomasked w63.
I have found where the w32 number came from : it's mentioned in the header comments of gPEAC_scan.c:
/usr/bin/time ./gPEAC_scan 4294967296 4294967296 f 4294967296(2147483647)=13603546275 M 1 candidates among 1 numbers (100.00000%) 1 hits among 1 candidates (100.00000%) 17.23user 0.00system 0:17.26elapsed 99%CPU
but there was a capacity overflow issue in the orbit length calculation, fixed since, but it was too late.
I shall investigate.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.