The "%a" specifier is new in C99, and it is supposed to print the
floating-point number in hexadecimal form.

The __mingw_printf function does recognize "%a", and when compiled
with -D__USE_MINGW_ANSI_STDIO,
no warning is fired, so I guess it is supported.

The problem is, this function seems to fail to handle whole numbers.
For example, this code snippet

printf("%a\n", 1.0);

outputs "0x0p-63" instead of "0x1.000000p+0" when compiled with the
-D__USE_MINGW_ANSI_STDIO option.
(Testing using "x86_64-posix-seh-rev0, Built by MinGW-W64 project")

I believe this is a bug in the library code.

------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to