I was playing with logarithms under an arbitrary-precision calculator, and got some odd results. I happened to have the precision set to 20 places, and these are the initial results I got:
ln 0.6666666 = -0.40546520810816938198
ln 2/3 = -0.40546510810816438198
"That's strange", I thought. "I would have expected the logarithms to be more different than that."
But then I looked more closely: they are different, in two places, with the first difference coming at the seventh digit, about as you would expect. But I would have expected all the digits after that to be different — it was quite a surprise that most of them were the same!
To be clear, my assumption is that if two numbers a and b are slightly different, and with a function f such that f(a) and f(b) are also slightly different, then unless there's something special going on, the decimal expansions of f(a) and f(b) will be identical up to a point, then diverge. Unless there's something special going on, I don't expect to see any patterns past the point of divergence — indeed for a transcendental function like ln, I don't expect to see any patterns in a decimal expansion at all. So how can it be that, in this case, there are quite a few digits in common after the point of divergence?
At first I assumed this was just a bizarre coincidence, but then I tried several other numbers, with similar results:
To 13 places:
ln 0.3333333 = -1.0986123886681
ln 1/3 = -1.0986122886681
To 20 places again:
ln 0.1111111 = -2.19722467733622438279
ln 1/9 = -2.19722457733621938279
ln 0.2222222 = -1.50407749677627907337
ln 2/9 = -1.50407739677627407337
(Similar results hold for 4/9, 5/9, 7/9, and 8/9.)
It seems there's got to be "something special" going on here, but I have no idea what! (Although, I realize that patterns in decimal expansions are not necessarily meaningful. I was going to additionally tag this question "numerology", but I guess that's not a tag. :-) )
Addendum: The answers reveal that in this case, my assumption that "for a transcendental function like ln, I don't expect to see any patterns in a decimal expansion at all" was quite wrong. The core of the answer to this question is that ln(1 - 10-7) is −0.000000100000005000000…, and I think this is going to be #3 on my list of fun numerological facts, behind 1001 = 7 · 11 · 13 and, of course, that one about eiπ.
Also, the answers help to answer two side questions I had but didn't ask at first:
- Does the effect depend on having truncated 2/3 specifically to 7 digits? No, and it's even more pronounced the more digits you leave in place. For example, if you truncate 2/3 to 15 places, you get an answer that looks like it's correct out to 45 places, typically differing only in the 15th and the 31st.
- Is there anything special about having 3 or 9 in the denominator? No, the effect usually works for any repeating decimal, as long as (I think) the period is shorter than the truncation point. (Also if the period is greater than 1, you may have to truncate at the right spot, involving multiples of the period.)
bc, and got exactly the same digits. I believe all the digits I've shown are correct and exact, out to the precisions indicated — if not, that would completely invalidate the question. (And if the digits are correct, they should obviously be independent of the algorithm used to compute them.) – Steve Summit May 04 '25 at 15:01