Date: Thu, 14 Jul 2005 14:52:24 -0400 From: David Schultz <das@FreeBSD.ORG> To: Mark Linimon <linimon@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 Message-ID: <20050714185224.GA95312@VARK.MIT.EDU> In-Reply-To: <200409010324.i813OjTi063637@freefall.freebsd.org> References: <200409010324.i813OjTi063637@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050714185224.GA95312>