Mail Archives: djgpp/1993/04/07/22:25:30
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 -