From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Meissner To: law@cygnus.com Cc: John David Anglin , gcc-patches@gcc.gnu.org Subject: Re: PATCH: HUGE_VAL should be Infinity Date: Mon, 16 Oct 2000 20:21:00 -0000 Message-id: <20001016232119.16729@cse.cygnus.com> References: <200010161746.NAA09258@hiauly1.hia.nrc.ca> <16099.971746527@upchuck> X-SW-Source: 2000-10/msg00499.html On Mon, Oct 16, 2000 at 07:35:27PM -0600, Jeffrey A Law wrote: > In message < 200010161746.NAA09258@hiauly1.hia.nrc.ca >you write: > > Under HP-UX 10.20 (and probably on other systems), HUGE_VAL is defined as > > 1.7976931348623157e+308 (same as DBL_MAX). This is the maximum normalized > > value for a double. However, HUGE_VAL should actually be defined as > > Infinity according to the hugeval.c testsuite program. > > > > The following technique for defining HUGE_VAL was derived from that used > > in the hugeval.c testsuite program and the linux bits/hugeval.h header. > > It is considerably simpler than that used in bits/hugeval.h. > > > > Dave > > -- > > J. David Anglin dave.anglin@nrc.ca > > National Research Council of Canada (613) 990-0752 (FAX: 952-6 > > 605) > > > > 2000-10-14 J. David Anglin > > > > * inclhack.def (hpux10_hugeval): New fix to correct definition > > of HUGE_VAL under HP-UX 10.X. > Don't you also need to fix HUGE_VALF? I suspect there is no HUGE_VALF, since that wasn't in the 1989 standard IIRC (it is in the 99 standard, since that standard now has float and long double math functions that could return HUGE_VAL{F,L}). -- Michael Meissner, Red Hat, Inc. PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA Work: meissner@redhat.com phone: +1 978-486-9304 Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482