Correct sign handling when dividing zero or infinity by something
From-SVN: r12009
This commit is contained in:
parent
ce122a8618
commit
e291fca1a3
|
@ -2,7 +2,7 @@
|
||||||
the floating point routines in libgcc1.c for targets without hardware
|
the floating point routines in libgcc1.c for targets without hardware
|
||||||
floating point. */
|
floating point. */
|
||||||
|
|
||||||
/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free software; you can redistribute it and/or modify it
|
This file is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by the
|
under the terms of the GNU General Public License as published by the
|
||||||
|
@ -944,13 +944,15 @@ _fpdiv_parts (fp_number_type * a,
|
||||||
{
|
{
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a->sign = a->sign ^ b->sign;
|
||||||
|
|
||||||
if (isinf (a) || iszero (a))
|
if (isinf (a) || iszero (a))
|
||||||
{
|
{
|
||||||
if (a->class == b->class)
|
if (a->class == b->class)
|
||||||
return nan ();
|
return nan ();
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
a->sign = a->sign ^ b->sign;
|
|
||||||
|
|
||||||
if (isinf (b))
|
if (isinf (b))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue