From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31692 invoked from network); 3 Dec 1998 00:51:19 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 3 Dec 1998 00:51:19 -0000 Received: from cygnus.com (runyon.cygnus.com [205.180.230.5]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA26800 for ; Wed, 2 Dec 1998 19:48:04 -0500 Received: from dot.cygnus.com (dot.cygnus.com [205.180.230.224]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id QAA12366 for ; Wed, 2 Dec 1998 16:48:00 -0800 (PST) Received: (rth@localhost) by dot.cygnus.com (8.8.7/8.6.4) id QAA11745; Wed, 2 Dec 1998 16:48:00 -0800 Message-ID: <19981202164800.G11351@dot.cygnus.com> Date: Wed, 2 Dec 1998 16:48:00 -0800 From: Richard Henderson To: axp-list@redhat.com Subject: Re: Floating point problems Reply-To: Richard Henderson References: <199811300816.IAA24959@ppp393.ts.rz.tu-bs.de> <3662D099.2CA026FA@frankfurt.netsurf.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1 In-Reply-To: <3662D099.2CA026FA@frankfurt.netsurf.de>; from Joachim Wesner on Mon, Nov 30, 1998 at 06:06:33PM +0100 On Mon, Nov 30, 1998 at 06:06:33PM +0100, Joachim Wesner wrote: > Here the DEC documentation is a bit misleading, it seems I was wrong ! > The fp ops have an additional qualifier /U that determines the underflow > behavior. HOWEVER, at a first look (what I had done till now,, it seems, > sorry), you only have two possibilities > > - either you do not use /U, then the documentation says any fp op will > trap with all the above problems when a denormal is a result of the op > > - or you use /U, then no trap will happen, but also, the denormal will > not be replaced by a true zero and the code will trap via 1) the next > time the result is used in further calculations. You are misreading. The /u qualifier _enables_ underflow detection for the instruction. To quote: If an underflow occurs, a true zero is always stored in the result register, even if the proper IEEE result would have been -0. If an underflow occurs and underflow traps are enabled by the instruction, an underflow arithmetic trap is signaled. So if you don't use /u, you'll never get underflow traps. > I have the impression that might be the function routines that are not > written to NOT return denormals, for example exp of a large negative > number could return a denormal. This should be changed. Possibly. OTOH, I would think only if we can determine that the caller is not prepared for such a value. I do not know how best to do this though. r~