From 7726d6a95d5a2c08c8d43186002f040b9b889c27 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 19 Mar 2012 20:11:09 +0000 Subject: Fix atan2 spurious exceptions (bug 11451). --- sysdeps/ieee754/dbl-64/e_atan2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/ieee754/dbl-64/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c index dcef55f072..497afcab1e 100644 --- a/sysdeps/ieee754/dbl-64/e_atan2.c +++ b/sysdeps/ieee754/dbl-64/e_atan2.c @@ -1,7 +1,7 @@ /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. - * Copyright (C) 2001, 2011 Free Software Foundation + * Copyright (C) 2001-2012 Free Software Foundation * * 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 @@ -153,6 +153,13 @@ __ieee754_atan2(double y,double x) { /* if either x or y is extremely close to zero, scale abs(x), abs(y). */ if (ax two500.d || ay > two500.d) + { + ax *= twom500.d; + ay *= twom500.d; + } + /* x,y which are neither special nor extreme */ if (ay