*BSD News Article 8654


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: [386BSD] This MAXDOUBLE patch fixes some floating point coredumps
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Wed, 9 Dec 1992 08:02:47 GMT
Message-ID: <ByzFoo.Ix0@NeoSoft.com>
Lines: 33

The value of MAXDOUBLE in /usr/include/values.h will cause a floating point
exception if a value is ever compared against it.  I have verified this
with gdb.

Anyone who has programs that compare things against MAXDOUBLE -- Tcl and/or 
wish are prime examples -- should apply this and rebuild.

*** /usr/karl/values.h	Wed Dec  9 01:20:52 1992
--- values.h	Wed Dec  9 01:33:49 1992
***************
*** 108,116 ****
  #define FMAXEXP     ((1 << _FEXPLEN - 1) - 1 + _IEEE)
  
  #elif defined(i386)
! #define MAXDOUBLE   1.79769313486231570e+308
  #define MAXFLOAT    ((float)3.40282346638528860e+38)
! #define MINDOUBLE   2.22507385850720140e-308
  #define MINFLOAT    ((float)1.17549435082228750e-38)
  #define _IEEE       0
  #define _DEXPLEN    11
--- 108,116 ----
  #define FMAXEXP     ((1 << _FEXPLEN - 1) - 1 + _IEEE)
  
  #elif defined(i386)
! #define MAXDOUBLE    1.79769313486231470E+308
  #define MAXFLOAT    ((float)3.40282346638528860e+38)
! #define MINDOUBLE   4.94065645841246544e-324
  #define MINFLOAT    ((float)1.17549435082228750e-38)
  #define _IEEE       0
  #define _DEXPLEN    11
-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"Turn on your hot tub by email now.  Ask me how."