From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13786 invoked from network); 3 Dec 1998 19:40:02 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 3 Dec 1998 19:40:02 -0000 Received: from beach.frankfurt.netsurf.de (root@beach.frankfurt.netsurf.de [194.64.181.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA29310 for ; Thu, 3 Dec 1998 14:36:26 -0500 Received: from Othello (deck-110.frankfurt.netsurf.de [194.64.181.142]) by beach.frankfurt.netsurf.de (8.8.5/8.8.5) with SMTP id UAA22501; Thu, 3 Dec 1998 20:36:24 +0100 (MET) Sender: fabwes@beach.frankfurt.netsurf.de Message-ID: <3666E7FF.223DC125@frankfurt.netsurf.de> Date: Thu, 03 Dec 1998 20:35:27 +0100 From: Joachim Wesner X-Mailer: Mozilla 3.04Gold (X11; I; Linux 2.0.33 i586) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Floating point problems References: <199812031659.LAA25618@adder.cs.Virginia.EDU> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greg Lindahl wrote: > > > > 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. > > If the compiler would make a symbol available based on the -mieee flag, > i.e. #define __mieee 0 or 1, then the include files for the math > library could pick routines which do or don't generate denorms. > > #if defined(__mieee) > #define sqrt sqrt > #else > #define sqrt sqrt_no_denorms > #fi YEP, sorry I did not follow this for some time. This is about what I was finally thinking, too. We would at least need 2 different libms. The current lib(d)m has even more problems on it's own. Instead of returning +/-Inf as a (hex) value, for example, it's written that way that +/-1./0. is executed, relying on the trap handling to clean it up, clearly not good for non -mieee programs. Hopefully later versions of libffm can replace that. BTW, do you know how "mother" DEC handles this ?? Are **there** different libm's used for different compiler switches (-mieee and -fptm n/u) ?? Or how do they resolve that ?? Joachim