PDA

View Full Version : Crude logrithms?



RussMartin
- 26th August 2009, 06:00
Does anyone know of a simple way to get crude/approximate logs? Or should I just put a lookup table in EEPROM?

Darrel Taylor
- 26th August 2009, 07:32
I've never used it, but it looks interesting.

http://www.dattalo.com/technical/software/pic/piclog.html
<br>

rsocor01
- 26th August 2009, 07:51
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