PATCH: HUGE_VAL should be Infinity

Michael Meissner meissner@cygnus.com
Mon Oct 16 20:21:00 GMT 2000


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  <dave@hiauly1.hia.nrc.ca>
>   > 
>   > 	* 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


More information about the Gcc-patches mailing list