This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Fix up long double fphex


On Sunday, March 04, 2012 21:42:57 Marek Polacek wrote:
> The __printf_fphex gave wrong results for long double values whose
> decimal fraction is != 0.  The problem is in PRINT_FPHEX_LONG_DOUBLE
> macro.  Here numstr and wnumstr should just be strings representating
> .ieee.mantissa[01] values.  But when we are saving the leading digit, we
> adjust the position of numstr, but not of wnumstr.  This way we output
> the leading digit in the wide case twice when we do PRINT () in case
> that precision > 0 later on.  This patch fixes that and adds a
> testcase as well.
> 
> Regtested on x86_64-linux, ok for trunk?

Yes, this is fine. Thanks

> BTW, I think it'll be worthwhile to adjust stdio-common/tst-fphex.c
> to work also with widechars (and maybe also with %A format specifier).
> Should I create a bug for this addition and the hack it up?

Yes, this would be a nice addition IMO.

Andreas
[...]
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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