(…until you think about it for a few seconds, then it’s not so weird anymore.)

Leo’s been fascinated recently by powers of 2, mostly because weird things happen in MineCraft at boundaries of powers of 2, because of floating point overflow and such-like phenomena. (Actually, weird things happen in all computers at boundaries of powers of 2, for the same reason.) as a result of his interest in powers of 2, he spends inordinate periods playing with calculators, and with Wolfram Alpha, and we’ve done a bunch of Lisp, which has built-in Bignums that let you do arbitrary precision arithmetic. This has all actually been very mathematically and computationally educational, but today he noticed something apparently very odd and surprising about powers of 2.

We all know that multiplying by 2 repeatedly gives powers of two, as: 2, 4, 8, 16, … And if you keep dividing by two, the rational representation is, unsurprisingly, the inverse, as: 1/2, 1/4, 1/8, 1/16, …. Leo noticed that the decimal representation of these progressive divisions by 2 seem to be powers of 5, not 2, as: 0.5, 0.25, 0.125, 0.0625, and that in order to get decimal equivalents of the increasing powers of 2 (2, 4, 8,…) you have to divide by 5, not by 2 as: 1/5=0.2, /5=0.04, /5=0.008, /5=0.0016, etc!

A moment’s thought will reveal this to be not very surprising, as 2 and 5 are inextricably bound together in base 10 arithmetic (because 10 = 2*5). So, even though the mathematical reason for this is obvious (after a moment’s thought), it remains slightly weird that 2, 4, 8, … are the same as 2.0, 4.0, 8.0, …. but 1/2, 1/4, and 1/8, … are 0.5, 0.25, 0.125, …. Put even more starkly: 2/1, 4/1 , 8/1, … invert naturally to 1/2, 1/4, 1/8, … but the decimal representations don’t “invert” in the same easy way: 2.0 -> 0.5, 4.0 -> 0.25, 8.0 -> 0.125, …. My friend, Eric, notes that: “Dividing by 2 is like multiplying by 5 and dividing by 10. Hence the successive powers of 5 and convenient shifting of the decimal point.” This just re-emphasizes the fact that rational representations (i.e., fractions, as 2/1 and 1/2) are very different than decimal, place-value representations; they just work differently is all there is to it, regardless of the *faux amis* of 2.0 (that is, decimal 2.0) and 2 (i.e., the number 2), and our short hand for rationals with unit denominator (as: 2/1 => 2) having similar looking overt.

Continued thoughts: Fractions (rational notation, as in 2=2/1=10/5, etc.) isn’t place-value! The separate components (numerator and denominator) are place value, but the whole thing isn’t! This leads to the weird effect that if you keep dividing by 2 from, say, 4, you get a nice balanced progressions: 4, 2, 1, 1/2, 1/4, and so on, whereas when you divide place-value notation by 2s you get 4.0, 2.0, 1.0, 0.5, 0.25, etc. The former (rational — fractional) notation is really just multiplying the denominator by 2 (i.e., dividing by 2), so the above sequence could, more obviously, be written: 4/1, 4/2, 4/4, 4/8, 4/16, etc. (you could, of course, start anywhere you wanted: 8/1, etc.). You can do the same trick in decimal notation by multiplying by, say, 1000: 8000, 4000, 2000, 1000, 500, 250, 125, etc. That looks a lot less odd, and you can see that it becomes “5-ish” when you have to divide what is an odd number: 1!