Floating Point Powers and Logs?

M

Mike Delaney

Does anyone have any suggestions on how to do Logs and Powers?
Part of the design I'm working on has "log(1 + B^d)", and we're pretty
much stuck there.
So far, the ideas being kicked around are to either use the Taylor
series (I'm not the biggest fan of this), or to try to use CORDIC.
I haven't found any free/open IP that looked like it would work, the
closest being a couple of (fixed-point) CORDIC cores from Open Cores.
Accuracy and speed are the two main concerns, but memory is tight, so
I don't know if a lookup table is doable. Are there any other
approximations that might work, and might be easier to implement using
floating point? And how do the hardware implementations in some FPU's
work?

Thanks,
Mike
 
K

Ken Smith

Does anyone have any suggestions on how to do Logs and Powers?
Part of the design I'm working on has "log(1 + B^d)", and we're pretty

If this is the only log and power you need to do and if either "B" or "d"
is a constant, I'd be suggest trying to do the whole function in one go.
I'd be very tempted to come up with a function that is sort of close and
then use a Taylor series to fix it.

If "d" is the only variable, breaking it into 2 ranges, one for each sign
of "d" would be a natural thing to do.
 
D

David Bishop

Mike Delaney wrote:

I've already implemented these for the VHDL-200x.
http://www.eda.org/vhdl-200x/vhdl-200x-ft/files.html
Take a look at "fphdl_base_alg_pkg.vhd", in floating point.

You will also find synthesizable fixed and floating point packages
here. Please give them a try, we need more people pounding on
this code.

These series are debugged and working, but not optimized, which is
why they are not being made part of the standard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top