Is it possible to calculate the logarithm in ASM without a LUT?

## Logarithm

Yes! You can evaluate a series to obtain the "ln" of a number until you have the required accuracy.

For logarithms for other bases you will have to do a conversion.

Much more straight forward when you use a C maths library though!

Wow! Thanks a lot guys! I thought it wasn't possible!

I thought it wasn't possible!

With enough memory and time the AVR core can do any calculation a quad-core PC can manage. Take alook at:

I thought it wasn't possible!

How "big" a processor do you think is in your $5 calculator?

If a C library has the log function you desire and that library is applicable to AVRs, then how could it not be "possible"?

Calculating Log with integers: https://www.avrfreaks.net/index.p...

**theusch wrote:**

Quote:

I thought it wasn't possible!

How "big" a processor do you think is in your $5 calculator?If a C library has the log function you desire and that library is applicable to AVRs, then how could it not be "possible"?

Not possible with my knowledge ;)