1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Print sign of NaN values.

This commit is contained in:
Ulrich Drepper
2009-08-23 11:57:52 -07:00
parent 659a63fb7b
commit 003c9895a8
4 changed files with 124 additions and 20 deletions

View File

@ -172,6 +172,7 @@ __printf_fphex (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnanl (fpnum.ldbl.d))
{
negative = fpnum.ldbl.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
@ -182,7 +183,6 @@ __printf_fphex (FILE *fp,
special = "nan";
wspecial = L"nan";
}
negative = 0;
}
else
{
@ -211,6 +211,7 @@ __printf_fphex (FILE *fp,
/* Check for special values: not a number or infinity. */
if (__isnan (fpnum.dbl.d))
{
negative = fpnum.dbl.ieee.negative != 0;
if (isupper (info->spec))
{
special = "NAN";
@ -221,7 +222,6 @@ __printf_fphex (FILE *fp,
special = "nan";
wspecial = L"nan";
}
negative = 0;
}
else
{