Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!hsdndev!husc6!encore!pinocchio.encore.com From: jkenton@pinocchio.encore.com (Jeff Kenton) Newsgroups: comp.arch Subject: Re: Alignment on RS/6000 Message-ID: <13342@encore.Encore.COM> Date: 26 Nov 90 15:19:26 GMT References: <897@sibyl.eleceng.ua.OZ> Sender: news@Encore.COM Lines: 27 From article <897@sibyl.eleceng.ua.OZ>, by ian@sibyl.eleceng.ua.OZ (Ian Dall): > In article <46760@apple.Apple.COM> baum@apple.UUCP (Allen Baum) writes: >> >>Its always been my impression that NaN, Inf, and Denorms were reasonably >>rare- they don't usually occur. Is this not the case? Are there statistics >>somewhere that show how often these cases occur? > > In a well behaved program they are extremely rare. Therefore, if they occur > you almost certainly have a bug and you might as well core dump. This is probably true for NaN's and Infinities, but Denorms occur all the time. printf() often generates them when dealing with floats, and the math library routines do also. With denorms, the real issue is whether a particular program cares about numbers in the denormalized range. Most don't and would work just as well (and faster) if there were an *option* to allow underflows to truncate to zero. "You might as well dump core" is not the thing to do. Note that I am *not* suggesting we eliminate denorms. They make good sense mathematically -- they're just slow on many RISC machines. ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ----- ----- jeff kenton: consulting at jkenton@pinocchio.encore.com ----- ----- until 11/30/90 -- always at (617) 894-4508 ----- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -----