code for finding logarithm

Status
Not open for further replies.

ammassk

Member level 2
Joined
Jul 19, 2012
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,606
dear all
Can anybody give me VHDL code for logarithm. I need to do logarithm base e for real numbers which I represented in fixed point format.(16 bit, 8 bit for fractional part).
 

You could use some cordic IP. Or do your own lookup table with some interpolation if you feel like it.

Short answer: CORDIC.
 

Can you please explain how cordic gives log values. CORDIC ip gives sin,cos,atan,arctanh etc. From these How will I get log(2.3134)? I got the relation 2* arctanh(x)=log(1+x/1-x). also how can i make LUT? Is it finding log values manually and store that values in memory?
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…