Bruno Haible wrote:
The algorithm for the second case also applies to the first case, but
no engineer with a sane mind would apply this algorithm to the first case.
Ah, that explains it! I was crazy, because I indeed thought of just that one
interpretation, and applied it to both cases.
Perh
Paul Eggert wrote:
> > Why would you consider the expected result "0x1.922p+1" wrong?
>
> The POSIX spec says "if the precision is missing and FLT_RADIX is a power of
> 2,
> then the precision shall be sufficient for an exact representation of the
> value;
> if the precision is missing and FLT
Bruno Haible wrote:
Why would you consider the expected result "0x1.922p+1" wrong?
The POSIX spec says "if the precision is missing and FLT_RADIX is a power of 2,
then the precision shall be sufficient for an exact representation of the value;
if the precision is missing and FLT_RADIX is not
Hi Gisle,
> When using MSVC-2015 to build the tests/unistdio/test-ulc-*.c files,
> I get ASSERT() on all the '%a' formats. E.g. in
> unistdio/test-ulc-vasnprintf1.exe
> and unistdio/test-ulc-printf1.h (line 195):
>
> char *result =
>my_xasprintf ("%a %d", 3.1416015625, 33, 44, 55);
Hi Paul,
> On 04/19/2017 05:13 AM, Gisle Vanem wrote:
> > With "%.3a %d", I do get the expected "0x1.922p+1 33".
> > So are these tests somewhat gcc-centric or what?
>
> Yes. It looks to me like MSVC-2015 is right and glibc is wrong, at least
> in the sense of acting like standard printf.
I ag
Paul Eggert wrote:
On 04/19/2017 05:13 AM, Gisle Vanem wrote:
With "%.3a %d", I do get the expected "0x1.922p+1 33".
So are these tests somewhat gcc-centric or what?
Yes. It looks to me like MSVC-2015 is right and glibc is wrong, at least in the
sense of acting like standard printf.
It see
On 04/19/2017 05:13 AM, Gisle Vanem wrote:
With "%.3a %d", I do get the expected "0x1.922p+1 33".
So are these tests somewhat gcc-centric or what?
Yes. It looks to me like MSVC-2015 is right and glibc is wrong, at least
in the sense of acting like standard printf.
When using MSVC-2015 to build the tests/unistdio/test-ulc-*.c files,
I get ASSERT() on all the '%a' formats. E.g. in
unistdio/test-ulc-vasnprintf1.exe
and unistdio/test-ulc-printf1.h (line 195):
char *result =
my_xasprintf ("%a %d", 3.1416015625, 33, 44, 55);
ASSERT (result != NULL