DSPRelated.com
Forums

2181 asm program for Logarithm & other lib functions

Started by jsc_1978 October 28, 2003
Hi,

I am using the ADSP-2181 EZ-KIT Lite.

Can anyone direct me to an asm program that calculates log base 10?
Also, I heard that ADI offers asm code for all of their library
functions. Is this true? I haven't had any luck calling C
functions from assembly programs.

Thanks,
Jessica



On Tue, 28 Oct 2003, jsc_1978 wrote:

> I am using the ADSP-2181 EZ-KIT Lite.
>
> Can anyone direct me to an asm program that calculates log base 10?
> Also, I heard that ADI offers asm code for all of their library
> functions. Is this true? I haven't had any luck calling C
> functions from assembly programs.

It's easier to do log base 2 and then multiply by log base 10 of 2.
Since you already store data in base 2, you just need to find log base 2
(fractional part) and add the exponent to get log base 2 of the number.
Find "Computer Approximations" by Hart for lots of coefficients. You can
get any level of accuracy you need.

Patience, persistence, truth,
Dr. mike