I have a problem that generates measurements of distance. The measured values fit the general form
I = A * exp(-B * x)
where x is distance.
I can calibrate and get values for A and B. Thing is, given I how best to calculate x? Since an exponential can be expressed as a power of 2 rather than e, it seems that there should be a relatively quick way of finding log(I). It is, after all, the number of bits required to store I in one sense.
However, I can't seem to find an example of doing quick (and probably dirty logs). It does need to be quick. I need six of these per millisecond and still have time to draw breath.
Failing that I will have to look at soime kind of look up table.
Any suggestions?
Pete Harrison