diff options
author | Andreas Jaeger <aj@suse.de> | 2012-03-20 20:40:16 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-03-20 20:40:16 +0100 |
commit | d6373f9ce3972a1891e4d09479a98e0dbc7e3d73 (patch) | |
tree | 39f9e5c231c70fde2c6326d066a3b9fd892042c2 /sysdeps/ieee754/dbl-64/e_atan2.c | |
parent | 1d6c3d237d10606121c959b9bd2ae722f79ea899 (diff) | |
parent | 1897ad44326bb7761dcda46132ae303f7288aba9 (diff) | |
download | glibc-d6373f9ce3972a1891e4d09479a98e0dbc7e3d73.tar.gz glibc-d6373f9ce3972a1891e4d09479a98e0dbc7e3d73.tar.xz glibc-d6373f9ce3972a1891e4d09479a98e0dbc7e3d73.zip |
Merge branch 'master' into elf-move
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_atan2.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_atan2.c | 9 |
1 files changed, 8 insertions, 1 deletions
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<twom500.d || ay<twom500.d) { ax*=two500.d; ay*=two500.d; } + /* Likewise for large x and y. */ + if (ax > two500.d || ay > two500.d) + { + ax *= twom500.d; + ay *= twom500.d; + } + /* x,y which are neither special nor extreme */ if (ay<ax) { u=ay/ax; |