Does anyone know of a simple way to get crude/approximate logs? Or should I just put a lookup table in EEPROM?
Printable View
Does anyone know of a simple way to get crude/approximate logs? Or should I just put a lookup table in EEPROM?
I've never used it, but it looks interesting.
http://www.dattalo.com/technical/sof...ic/piclog.html
<br>
There are many methods for approximating a logarithm but all require a lot of computation to get a decent approximation. If you can deal with continued fractions or powers to the fourth then you are fine.
Another solution is to plot the log function that you will use in the range that you need using a program like Microsoft Excel. Then find an approximation (an equation) using the functions provided in the Excel program.
Robert