This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [Ask for help]: Met a problem with strtof
- From: Ryan Arnold <ryan dot arnold at linaro dot org>
- To: Mark Brown <ms_brown at sbcglobal dot net>
- Cc: Wang Weidong <wangweidong1 at huawei dot com>, "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Fri, 25 Apr 2014 09:26:55 -0500
- Subject: Re: [Ask for help]: Met a problem with strtof
- Authentication-results: sourceware.org; auth=none
- References: <53566C6A dot 4050804 at huawei dot com> <5358058F dot 9010806 at sbcglobal dot net> <5358691A dot 1090104 at huawei dot com> <53598073 dot 9010809 at sbcglobal dot net> <535A100A dot 409 at huawei dot com> <535A6EC9 dot 30608 at sbcglobal dot net>
Hi Mark & Wang,
I believe that between glibc 2.16 and glibc 2.19 there was a focus on
improving the conformance of the FP routines w/rt rounding modes and
conforming error conditions to the various specifications. Joseph
Myers was working on that.
Ryan
On Fri, Apr 25, 2014 at 9:18 AM, Mark Brown <ms_brown@sbcglobal.net> wrote:
> On 04/25/2014 02:34 AM, Wang Weidong wrote:
>> I found a Bug report on https://sourceware.org/bugzilla/show_bug.cgi?id=14518
>> which report "strtod ignores the rounding mode and always tries to round to nearest. "
>> Such as FE_UPWARD is "rounding towards positive infinity"
>> It means that the value should "<=" the rounding value.
>> So I think in glibc-2.11 here "-0x1.4EF009P-16 -> -0x1.4ef00ap-16" it is wrong while
>> in glibc-2.17+ is right. And similar to the others.
>
> Well, as I noted when I started this I'm not an FP expert; but the glibc
> 2.19 results I get match my expectations.
>
> --
> Mark Brown
> ms_brown@sbcglobal.net
--
Ryan S. Arnold
Linaro Toolchain Working Group
www.linaro.org