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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user