Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* scanf/glibc bug for very small numbers !!!
@ 1998-11-17  5:00 Joachim Wesner
  0 siblings, 0 replies; only message in thread
From: Joachim Wesner @ 1998-11-17  5:00 UTC (permalink / raw)


Hi,


when checking handling of denormalized numbers in the soon to be
released new libffm version, I stumbled over a bug in scanf on my system
(Still RH 4.2, I had not yet time to upgrade it - but hopefully next
week -, however, as Kazushige Goto just checked on his NON RH system it
seems to be an error of any glibc scanf):

When reading a floating point number to a double with scanf I get the
following results:

Input     Hex of double prec. #

1e-307 -> 0x0031f...... 	Regular number, OK
1e-308 -> 0x03f25......  	!!!!!!!!!!!! WRONG !!!!!!!!
1e-309 -> 0x0000b...... 	Denormalized, OK

It seems that also 10e-309, 100e-310 etc. lead to the same bug.

Can anybody comment on this ??? Where is the source for the core routine
that does the conversion ?? If I'd know, I'd try to find the location of
the bug and fix it.


Joachim



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-11-17  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-17  5:00 scanf/glibc bug for very small numbers !!! Joachim Wesner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox