R
Rob Gaddi
Guest
Hey y'all --
So this is one of those times that my lack of serious math chops is
coming round to bite me, and none of my usual books is helping me out.
I'm hoping someone has some thoughts.
I'm trying to approximate either exp(-1/(n+1)) or 4^(-1/n+1). I can
convince myself I don't care which. n is an integer from 1-65535, and
the result should be fixed-point fractional, probably U0.18. The
function output is always between 0-1, and goes up like a rocket for
small n before leveling off to a steady cruise of >0.9 for the rest of
the function domain.
I'm working in an FPGA, so I've got adds, multiplies, and table lookups
from tables of reasonable size (10s of kb) cheap, but other things
(divides especially) are expensive. I can throw several clock cycles
at the problem if need be.
Taylor series attacks seem to fail horribly. I feel like there may be
some answer where answers for n in [1,127] gets a direct table lookup,
and n in [128,65535] gets some other algorithm, possibly with a table
boost. Or somehow taking advantage of the fact that log(1-f) is
related to log?
Anyone have any thoughts?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.H
So this is one of those times that my lack of serious math chops is
coming round to bite me, and none of my usual books is helping me out.
I'm hoping someone has some thoughts.
I'm trying to approximate either exp(-1/(n+1)) or 4^(-1/n+1). I can
convince myself I don't care which. n is an integer from 1-65535, and
the result should be fixed-point fractional, probably U0.18. The
function output is always between 0-1, and goes up like a rocket for
small n before leveling off to a steady cruise of >0.9 for the rest of
the function domain.
I'm working in an FPGA, so I've got adds, multiplies, and table lookups
from tables of reasonable size (10s of kb) cheap, but other things
(divides especially) are expensive. I can throw several clock cycles
at the problem if need be.
Taylor series attacks seem to fail horribly. I feel like there may be
some answer where answers for n in [1,127] gets a direct table lookup,
and n in [128,65535] gets some other algorithm, possibly with a table
boost. Or somehow taking advantage of the fact that log(1-f) is
related to log?
Anyone have any thoughts?
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.H