From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13689 invoked by alias); 4 Jun 2010 01:02:41 -0000 Received: (qmail 11856 invoked by uid 48); 4 Jun 2010 01:02:30 -0000 Date: Fri, 04 Jun 2010 01:02:00 -0000 Message-ID: <20100604010230.11855.qmail@sourceware.org> From: "exploringbinary at gmail dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20061107172025.3479.hack@watson.ibm.com> References: <20061107172025.3479.hack@watson.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/3479] Incorrect rounding in strtod() X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00066.txt.bz2 ------- Additional Comments From exploringbinary at gmail dot com 2010-06-04 01:02 ------- Regarding the example 3.518437208883201171875e+013, I think you can see what's going on better by looking at its value in "pure" binary: 1000000000000000000000000000000000000000000000.00000011 It has 54 significant bits, with bit 54 equal to 1 -- a halfway case. Since bit 53 is also 1, it should round up to 1000000000000000000000000000000000000000000000.000001 I've written an article describing this and other examples of incorrectly rounded conversions: http://www.exploringbinary.com/incorrectly-rounded-conversions-in-gcc-and-glibc/ . -- http://sourceware.org/bugzilla/show_bug.cgi?id=3479 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.