www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/04/14/01:25:31

Date: 14 Apr 1993 15:12:17 +1100
From: Bill Metzenthen <APM233M AT vaxc DOT cc DOT monash DOT edu DOT au>
Subject: A p.s. on the bug in double
To: djgpp AT sun DOT soe DOT clarkson DOT edu

As a post-script to the thread on floating point constants, I have
updated my Linux system to the latest libs and the conversion routines
now appear to be fixed (they previously had problems with numbers very
close to MAXDOUBLE). I believe that the offending function was strtod().

I imagine that it would be easy to put this function into the libs for
djgpp and hence fix the problems in the dgjpp gcc by re-linking gcc
with the fixed strtod().

The latest Linux results for the small test program which started the
thread are:

MAXDOUBLE = 1.79769313486231570815e+308
ALMOSTMAX = 1.79769313486231471023e+308
dd        = 1.79769313486231570815e+308 = 0xffffffff 0x7fefffff
ddd       = 1.79769313486231471023e+308 = 0xfffffffa 0x7fefffff

The ALMOSTMAX result is correct to about 57 bits (i.e. it is the closest
possible double to the nominal value).

--Bill


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019