diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_remainder.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_remainder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_remainder.c b/sysdeps/ieee754/dbl-64/e_remainder.c index 7f3a02b3c2..a445e74b5c 100644 --- a/sysdeps/ieee754/dbl-64/e_remainder.c +++ b/sysdeps/ieee754/dbl-64/e_remainder.c @@ -1,7 +1,7 @@ /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. - * Copyright (C) 2001-2015 Free Software Foundation, Inc. + * Copyright (C) 2001-2016 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -130,6 +130,8 @@ __ieee754_remainder (double x, double y) d = fabs (z); if (d <= fabs (d - y)) return z; + else if (d == y) + return 0.0 * x; else return (z > 0) ? z - y : z + y; } |