* utils.c (floatformat_from_doublest): Improve test for infinity.
This commit is contained in:
parent
283e535d3f
commit
9b91bc2295
2 changed files with 5 additions and 1 deletions
|
@ -2387,7 +2387,7 @@ floatformat_from_doublest (fmt, from, to)
|
|||
dfrom = -dfrom;
|
||||
}
|
||||
|
||||
if (dfrom + 1 == dfrom) /* Result is Infinity */
|
||||
if (dfrom + dfrom == dfrom && dfrom != 0.0) /* Result is Infinity */
|
||||
{
|
||||
/* Infinity exponent is same as NaN's. */
|
||||
put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue