Re: Formula for Damping f times
Fabian Giesen <[email protected]>
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <[email protected]> |
> 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 ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list