Doing 'log' maths without a log function

And if you have to resort to a lookup table, remember to use the progmem/flash RAM to store it, not SRAM. However, I would check out math.h first. Potentially a quicker way to get the job done.