Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!sun!gammara!khb From: khb@gammara.Sun.COM (gammara) Newsgroups: comp.arch Subject: Re: IEEE 754 vs. 854 (floating-point arithmetic) Keywords: floating-point exceptions Message-ID: <107183@sun.Eng.Sun.COM> Date: 30 May 89 17:39:49 GMT References: <18721@cup.portal.com> <6@pzbaum.uucp> Sender: news@sun.Eng.Sun.COM Reply-To: khb@sun.UUCP (gammara) Organization: Sun Microsystems, Mountain View Lines: 37 In article <6@pzbaum.uucp> jimv@pzbaum.UUCP (Jim Valerio) writes: > >I believe that IEEE 854's permission to return an infinity or zero in the >case of massive overflow or underflow, rather than IEEE 754's QNaN, was an >attempt to correct a perceived mistake in the 754 exception handling. If >you need to choose a result here, I recommend returning the infinity or >zero result, and not the QNaN. 754 machines return denormalized numbers for underflow ... not QNaN. Massive overflow yeilds +- inf not QNaN. 0/0 yeilds NaN. > >I understand that there is a review of IEEE 754 coming up in the next few >years. Personally, I'm looking forward to arguing for a number of modest >changes, including: > (1) Replace subnormal/denormal numbers by a single value (call it epsilon > or infinitesimal), and define arithmetic underflow in terms of this > limiting value. > (2) Remove bias adjusted results for trapped overflow and underflow, and > always return either infinity or epsilon when overflow or underflow > occurs. >-- for 32-bit machines the subnormization process is a good thing (if one cares about getting the right answer). For better or worse, most folks don't care about getting it right; or if they do they use 64-bit math. Kahan has been pitching a pre-substitution scheme. Those interested should contact him for details. Keith H. Bierman |*My thoughts are my own. Only my work belongs to Sun* It's Not My Fault | Marketing Technical Specialist ! kbierman@sun.com I Voted for Bill & | Languages and Performance Tools. Opus (* strange as it may seem, I do more engineering now *)