home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11813 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.6 KB  |  40 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!gatech!destroyer!fmsrl7!lynx.unm.edu!zia.aoc.nrao.edu!laphroaig!cflatter
  3. From: cflatter@nrao.edu (Chris Flatters)
  4. Subject: Re: Correct values for float.h, compiling gcc-
  5. Message-ID: <1993Jan26.003133.20730@zia.aoc.nrao.edu>
  6. Sender: news@zia.aoc.nrao.edu
  7. Reply-To: cflatter@nrao.edu
  8. Organization: NRAO
  9. References: <1993Jan25.152028.10017@yrloc.ipsa.reuter.COM>
  10. Date: Tue, 26 Jan 93 00:31:33 GMT
  11. Lines: 27
  12.  
  13. In article 10017@yrloc.ipsa.reuter.COM, bsd@yrloc.ipsa.reuter.COM (Brian de Alwis) writes:
  14. >What exactly are the correct values for <float.h>?
  15. >
  16. >This problem has come up while attempting to compile gcc-2.3.3 (are
  17. >there any patches out there? I couldn't find any, with my limited
  18. >resources here). It seems that the build proceeds with no problems
  19. >until enquire.c is compiled with the new xgcc. On line 2307, it
  20. >craps out with a `floating point constant out of range'. I haven't
  21. >had too much time to look at any further.
  22. >
  23. >When I tried compiling enquire with the `stock' gcc-1.39, it manages
  24. >to compile properly, but dumps core with a precision exception when
  25. >commencing the double tests. I think it may be my implementation of
  26. >strtod (from the Tcl distribution).
  27.  
  28. The values that need to be corrected are DBL_MAX and DBL_MIN.
  29.  
  30. #define DBL_MIN         2.2250738585072014E-308
  31. #define DBL_MAX         1.7976931348623157E+308
  32.  
  33. (DBL_MAX in /usr/include/float.h is one digit too short and rounded high).
  34. There are also problems with HUGEVAL being defined to be 1E500 in math.h ---
  35. fixing this will require some changes to libm.
  36.  
  37.     Chris Flatters
  38.     cflatter@nrao.edu
  39.  
  40.