Re: [Algorithms] Formula for Damping f times
Brought to you by:
vexxed72
From: Fabian G. <f.g...@49...> - 2009-06-06 09:33:09
|
> exp() is one of the simplest and most direct math function to > implement. It should be approximately the cost of, say, five or > sequential six multiply-adds (and that includes range reduction and > reconstruction). Do not fear exp(). > > pow(), however, is a different story. But since the log is only done on k (which is, presumably, a constant), you can just store log(k) directly and do exp(log(k)*t) (with some small loss in accuracy that's unlikely to be a problem). Also, if you have them, base-2 log and exp are usually slightly faster and have less potential for extra rounding errors on IEEE FP machines. -Fabian Giesen |