[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: misc/35381: incorrect floating-point display of large values when using round-upward IEEE mode

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.
freebsd-standards_(_at_)_freebsd_(_dot_)_org mailing list
To unsubscribe, send any mail to "freebsd-standards-unsubscribe_(_at_)_freebsd_(_dot_)_org"