This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] FP printing, take 2


Hi Jerry,

and, first, sorry for late replying, I'm traveling

> > I wanted to ask how are you testing the ongoing work: I remember you
>  > had
> > a script comparing printf to the inserters and that we still had
>  > some
> > minor problems (proably false alarms) in corner cases... I would be
> > happy to run something similar on a few 64-bit architectures but
>  > maybe I
> > will not be really able to do that during the next 1 & half week or
>  > so.
>  > Let's keep in touch.
> 
> I still use the same program. It had the core code being called
> directly and
> compared the results to sprintf. I run about half a million random or
> regular
> numbers through looking for differences.  The only ones I see are:
> 
> mine  glibc
> 0.0001    1e-04   %g style
> 1e00   1e-00   %e style
> 
> In both cases I think glibc is wrong, based on printf docs around the
> web. I
> don't have the C standard, so I can't confirm, though.

Ok, thanks for the details. I'll try to investigate this issue in detail
during the next days.

> I'd be happy to send you the test prog for 64 bits. I need to pull it
> off the
> machine it's sitting on.

I would appreciate that, thanks in advance.

> > Another unrelated comment: are you taking into account in the design
> > that bug with grouping & zero precision (no decimal point, anyway)
>  > that
> > I mentioned some time ago? Basically, we look for the decimal point
>  > and
> > we group everything to its left: if we don't find it, we group also
>  > the
> > exponential part, if present! Fixing it in the current framework its
> > feasible but very ugly, and I was wondering whether we can arrange
>  > for
>  > the new framework to make it easier...
> 
> I remember there being an issue, but I haven't paid attention to it in
> this
> work. I'll think about whether this stuff makes it any easier. I'm not
> sure
> it does.  What's the PR?

There is no PR, yet, probably I should file one: for now is all in my
paranoid mind ;) Seriously, we have a real long standing bug, albeit for
a rather uncommon case (thousands separators + no decimal point). The
issue is rather clear, anyway and constructing a testcase should be
straightforward.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]