delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/04/07/22:25:30

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Cc: cjd AT brb DOT dmt DOT csiro DOT au
Subject: Re: Bug in floating point constants
Date: Thu, 08 Apr 93 12:26:39 +1000
From: Cameron Davidson <cjd AT brb DOT dmt DOT csiro DOT au>

Richard Stallman's reply:
>  Is there any reason to think this bug is in GCC?
>  I would expect it is in the C library that you are using.
>  However, you are in luck: the next version of GCC will
>  come with its own floating point conversion code, which
>  ought to be fully accurate.

Yes: atof, strtod and scanf all give the same problem.

It is a bit messier than I noted before:
as the exponent increases, an increasing number of the least significant
bits of the mantissa are not set reliably. By the time the exponent is
around 270-300 (decimal) 4 bits are unreliable.

Cameron Davidson,
CSIRO Division of Manufacturing Technology,   Telephone: +61 7 212 4535
Qld Centre for Advanced Technologies,         Facsimile: +61 7 212 4681
2643 Moggill Rd, Pinjarra Hills, Qld, 4069.   Internet:  cjd AT brb DOT dmt DOT csiro DOT au

- Raw text -


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