You might be interested to know about mod 2^m -1. Look at these numbers:
32640, 15420, 39321, 43690
In binary they look like:
1111111100000000, 0111100001111000, 0011001100110011, 0101010101010101
How cute. They are like little one bit precision sine waves.
I assure you that these numbers multiplied by each other mod (2^16 -1) are all equal to zero. When multiplied by themselves they shift position. test it for yourself. Long story short, in the field of mod 2^16 -1, 2^x works just like e^pi i, these numbers function just like sine and cosine, and you can even make linear superposition out of them and use them as a basis to decompose other ints into "frequency space."
Even better, the number i is represented here. There's a number int this modulo system which squares to 1111111111111110 (aka -1). Once you see it, you can implement fast sine and cosine directly through 2^{ix} = cos(x) + i sin(x).
32640, 15420, 39321, 43690
In binary they look like: 1111111100000000, 0111100001111000, 0011001100110011, 0101010101010101
How cute. They are like little one bit precision sine waves.
I assure you that these numbers multiplied by each other mod (2^16 -1) are all equal to zero. When multiplied by themselves they shift position. test it for yourself. Long story short, in the field of mod 2^16 -1, 2^x works just like e^pi i, these numbers function just like sine and cosine, and you can even make linear superposition out of them and use them as a basis to decompose other ints into "frequency space."
Even better, the number i is represented here. There's a number int this modulo system which squares to 1111111111111110 (aka -1). Once you see it, you can implement fast sine and cosine directly through 2^{ix} = cos(x) + i sin(x).
Cool right.
Have fun.