Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA39 ; Wed, 27 Jan 93 13:11:52 EST Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!hp9000.csc.cuhk.hk!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!gatech!destroyer!fmsrl7!lynx.unm.edu!zia.aoc.nrao.edu!laphroaig!cflatter From: cflatter@nrao.edu (Chris Flatters) Subject: Re: Correct values for float.h, compiling gcc- Message-ID: <1993Jan26.003133.20730@zia.aoc.nrao.edu> Sender: news@zia.aoc.nrao.edu Reply-To: cflatter@nrao.edu Organization: NRAO References: <1993Jan25.152028.10017@yrloc.ipsa.reuter.COM> Date: Tue, 26 Jan 93 00:31:33 GMT Lines: 27 In article 10017@yrloc.ipsa.reuter.COM, bsd@yrloc.ipsa.reuter.COM (Brian de Alwis) writes: >What exactly are the correct values for <float.h>? > >This problem has come up while attempting to compile gcc-2.3.3 (are >there any patches out there? I couldn't find any, with my limited >resources here). It seems that the build proceeds with no problems >until enquire.c is compiled with the new xgcc. On line 2307, it >craps out with a `floating point constant out of range'. I haven't >had too much time to look at any further. > >When I tried compiling enquire with the `stock' gcc-1.39, it manages >to compile properly, but dumps core with a precision exception when >commencing the double tests. I think it may be my implementation of >strtod (from the Tcl distribution). The values that need to be corrected are DBL_MAX and DBL_MIN. #define DBL_MIN 2.2250738585072014E-308 #define DBL_MAX 1.7976931348623157E+308 (DBL_MAX in /usr/include/float.h is one digit too short and rounded high). There are also problems with HUGEVAL being defined to be 1E500 in math.h --- fixing this will require some changes to libm. Chris Flatters cflatter@nrao.edu