I saw this back around 1966 in a paper by George Forsythe, some form of which may have been in the Monthly (or maybe not?). The original technical report seems to be here ftp://reports.stanford.edu/pub/cstr/reports/cs/tr/66/40/CS-TR-66-40.pdf Jim Buddenhagen On Mon, Jul 28, 2008 at 11:16 PM, Mike Speciner <ms@alum.mit.edu> wrote:
Those were nice. One of the slides reminded me that for solving quadratics (-b +- sqrt(b^2-4ac))/2a = 2c/(-b -+ sqrt(b^2-4ac)), so better precision for the two roots can be obtained by picking one root from each side so that both can have the sign of the sqrt same as -b. (And then it's easy to see the RHS root approaching -c/b as a->0.)
I don't remember where I first saw this trick, but I've certainly made use of it many times.
--ms
-----Original Message----- From: math-fun-bounces@mailman.xmission.com [mailto:math-fun-bounces@mailman.xmission.com]On Behalf Of Jason Sent: Sunday, July 27, 2008 14:21 To: math-fun@mailman.xmission.com Subject: [math-fun] Presentation on floating point implementation
I thought these slides were well-paced and interesting:
http://www.research.scea.com/gdc2003/fast-math-functions_p1.pdf http://www.research.scea.com/gdc2003/fast-math-functions_p2.pdf
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun