Re: [Algorithms] approximation to pow(n,x)?
Brought to you by:
vexxed72
From: Danny K. <dr...@we...> - 2009-11-04 12:50:43
|
> x^m = exp(m log x) > > > So really you need a fast exp and log function. > > > Can you newton-raphson refine a log and exp calculation? > I've never tried ... perhaps someone else can help there. > > > Failing that you could probably use tables for the > calculations though this, obviously, limits the range of > powers you can perform. I know nothing about this but one thing that pops into my head is that exp and log both have a lot of self-similarity features so I wonder whether that would help. I once experimented with using a look-up table with very few entries and catmull-rom interpolation between them. It was just playing, but I do remember getting surprisingly fast results on sin and cos. Danny (aware he's out of his depth...) |