Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 4 Apr 2014 21:41:20 -0400
From: Rich Felker <>
Subject: Re: printf issues

On Fri, Apr 04, 2014 at 08:01:00PM -0400, Morten Welinder wrote:
> I *think* the right fix is to add the following "if' statement into
> the rounding loop:
>                 while (*d > 999999999) {
>                     *d--=0;
>                     if (d < a) *--a = 0;
>                     (*d)++;
>                 }
> This also ought to make the d<a test afterwards unnecessary.  But
> more tests would be better.

This looks right.

Are you sure a==big is not possible at this point? I *think* it's
impossible, since a==big can only happen if e2<0, in which case
applying the exponent is going to reduce the first slot so that
rounding could never cause it to overflow. Do you agree with this


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.