Re:Fun with math: Dividing one by 998001 yields a surprising...
by bdg on Thursday January 26, 2012 @12:29PM
(#3515013)
I just want to know I appreciate you posting this. Some people might be interested in "wow math sure can do some funky stuff", but others like myself really want to know why. I figure that's also covers a sizable group of us here on Hacker News.
[ Parent
| on HN ]
Re:Fun with math: Dividing one by 998001 yields a surprising...
by toasterweasel on Thursday January 26, 2012 @09:20PM
(#3516920)
It does indeed. I have a love/hate relationship with math. Love because it's fascinating and intergal to an understanding of our universe, hate because I had some horrible math teachers over the years...plus I do admit to being slightly lazy.
Re:Fun with math: Dividing one by 998001 yields a surprising...
by jklp on Thursday January 26, 2012 @11:55PM
(#3517200)
There is no why. It just is. This is the worst thing about being human :)
Re:Fun with math: Dividing one by 998001 yields a surprising...
by psykotic on Friday January 27, 2012 @12:36AM
(#3517263)
Nice trick. It works in any even base b:
xy = b((x - b/2) + (y - b/2)) + (b - x)(b - y)
For b = 2 in particular, x - b/2 and x - b/2 are the negative 1's complements of x and y, and b - x and b - y are the 2's complements. More generally, they are the same kinds of complements generalized to base b.Because of that symmetric relationship with complementation, I suspect there is a conceptual proof waiting to be found. By conceptual I mean something that isn't just blind formula crunching. That would get us much closer to "why".