Close

Summing it up...

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

yann-guidon-ygdesYann Guidon / YGDES 01/03/2022 at 10:390 Comments

So I added an accumulation option to the dump7ck.tgz program. It took one second to get all these results:

opened log.02.p7k  Sum = 9
opened log.03.p7k  Sum = 35
opened log.04.p7k  Sum = 135
opened log.05.p7k  Sum = 525                 != 527
opened log.06.p7k  Sum = 2079  == 2079 ???
opened log.07.p7k  Sum = 8157                != 8255
opened log.08.p7k  Sum = 19205               != 32895
opened log.09.p7k  Sum = 130660 -> bad       != 131327
opened log.10.p7k  Sum = 524799
opened log.11.p7k  Sum = 2095074 -> bad      != 2098175
opened log.12.p7k  Sum = 8390626 -> bad      != 8390655
opened log.13.p7k  Sum = 33558525            != 33558527
opened log.14.p7k  Sum = 134225869           != 134225919
opened log.15.p7k  Sum = 536775078 -> bad    != 536887295
opened log.16.p7k  Sum = 2147516415
opened log.17.p7k  Sum = 8589998505          != 8590000127
opened log.18.p7k  Sum = 34359868345         != 34359869439
opened log.19.p7k  Sum = 137419532490 -> bad != 137439215615
opened log.20.p7k  Sum = 549742859919        != 549756338175
opened log.21.p7k  Sum = 2199023259575       != 2199024304127
opened log.22.p7k  Sum = 8796095119345       != 8796095119359
opened log.23.p7k  Sum = 35184376226591      != 35184376283135
opened log.24.p7k  Sum = 140737496743935 == 140737496743935 ???
opened log.25.p7k  Sum = 562949764361284 -> bad != 562949970198527

We can already spot "obviously bad widths" by looking at the parity of the sum: the formula for the length of a maximal orbit is 2^(2w-1) + 2^(w-1) - 1 so the orbit length must be odd (for w>2). I have marked the even sums which clearly indicate that some orbits do not cross the Y=0 line. About one third of the sums are discarded this way.

For the real lengths, let's compute them:

$ for i in $(seq 1 26); do echo $i $(( ( (1 + 2**i)* 2**(i-1) ) -1 )) ; done
1 2
2 9
3 35
4 135
5 527
6 2079
7 8255
8 32895
9 131327
10 524799
11 2098175
12 8390655
13 33558527
14 134225919
15 536887295
16 2147516415
17 8590000127
18 34359869439
19 137439215615
20 549756338175
21 2199024304127
22 8796095119359
23 35184376283135
24 140737496743935
25 562949970198527
26 2251799847239679

(note: here I have used the "real" sum formula, while I often use another that does not count the transition x=0 to x=1 in many programs. But since this special case is now handled in the scanner, the true formula is back)

I have copied these values in the first dump. Only two known bad widths are remaining, w6 and w24.

w6 is quite interesting because it contains 6 orbits of equal lengths, now I wonder how many orbits w24 has and if their lengths are equal.

Overall, we see that the sum method is great at sieving non-maximal widths. It's also a good sanity check and it spots non-maximal widths, which may still be decent candidates.

Now it's time to program that fusion...

Discussions