Distance Formula Redux

Prepared 2007-07-24 (149/92544#12) by Bill Claff

**The Symbolic Math Showing
'Equivalence' of the Formulas**

The conventional formula is d = 0.01 * 10 ^{(x / 40)}

0.01 = 10 ^{-2} so d = 10 ^{(x / 40 - 2)}

Rearrange the exponent for d = 10 ^{((x - 80) / 40)}

10 = 2^{log}_{2}^{(10)} so d = 2^{log}_{2}^{(10)
* ((x - 80) / 40)}

Rearrange the exponent for d = 2^{((x - 80) * log}_{2}^{(10)
/ 40)}

Note that log_{2}(10) ~= 3.322 ~= 3.333... = 10 / 3 = 40 / 12

Replace into the exponent to get the formula I claim is correct

d = 2^{((x - 80) / 12)}

**Why Favor This Formula?**

I have no source and I've never seen an authoritative source for the formula in
common use; I believe it was simply derived from the data.

All of the other logarithmic camera metadata is stored as fractional values
using a base of 2 and not 10.

So I have no reason to believe that an exception was made for this single case.

In fact, in the assembler language of the firmware, and with limited space, it
would make a great deal of sense to leverage any existing firmware code.