From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 14 18:54:38 2005 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.ORG Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3841C16A41C; Thu, 14 Jul 2005 18:54:38 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE29243D46; Thu, 14 Jul 2005 18:54:37 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j6EIqPOI095384; Thu, 14 Jul 2005 14:52:25 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j6EIqPk8095383; Thu, 14 Jul 2005 14:52:25 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 14 Jul 2005 14:52:24 -0400 From: David Schultz To: Mark Linimon Message-ID: <20050714185224.GA95312@VARK.MIT.EDU> Mail-Followup-To: Mark Linimon , freebsd-bugs@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG References: <200409010324.i813OjTi063637@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409010324.i813OjTi063637@freefall.freebsd.org> Cc: freebsd-bugs@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: misc/35381: incorrect floating-point display of large values when using round-upward IEEE mode X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 18:54:38 -0000 This does not occur in FreeBSD 5.X. It's unlikely that the issue will be fixed in 4.X because the fix involves importing an updated version of a library and making substantial changes to libc. I reported some related problems to the author of gdtoa (which is the library we use to perform this type of conversion) some months ago. These bugs affect 5.X and 6-CURRENT, although technically speaking fixing them is not required (only recommended) by POSIX. | - When FLT_ROUNDS is 3 (round downward), strtod() converts | the string "0x1.ffffffffffffffp0" to 2. The correct | result is 0x1.fffffffffffffp0. | | - When FLT_ROUNDS is 3, strtopx() converts the string | "1.999999999999999999999999999999999" to 2. Strtod(), | on the other hand, correctly rounds down. | | - When FLT_ROUNDS is 2 (round upward), strtod() converts | the string "0x1.23p-5000" to 0. The correct result | when rounding upwards is the smallest representable | number, 0x1p-1074.