bug-gnulib
[Top][All Lists]
Advanced

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

Re: output rounding bug in vasnprintf %e format implementation


From: Ben Pfaff
Subject: Re: output rounding bug in vasnprintf %e format implementation
Date: Sat, 19 Apr 2008 08:56:11 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Ben Pfaff wrote:
>> [This issue arose in examination of bug 22924 against GNU PSPP,
>> which may be viewed at https://savannah.gnu.org/bugs/?22924.]
>> 
>> The %e format implemented by gnulib's vasnprintf (when
>> NEED_PRINTF_DOUBLE is defined) does not round properly in all
>> cases.  Here is one example: 999.95 printed with %.4e should
>> yield 9.9995e+02, but actually yields 1.0000e+03 with the gnulib
>> implementation.
>
> Thank you for reporting this. I'm committing the attached fix.

Thanks!  Your solution is much better than mine.
-- 
Ben Pfaff 
http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]