Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Joachim Wesner <joachim.wesner@frankfurt.netsurf.de>
Subject: scanf/glibc bug for very small numbers !!!
Date: 1998/11/17	[thread overview]
Message-ID: <3651D53D.53D2DEEC@frankfurt.netsurf.de> (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



                 reply	other threads:[~1998-11-17  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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