summaryrefslogtreecommitdiff
path: root/libjava/classpath/native/fdlibm/e_atan2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/native/fdlibm/e_atan2.c')
-rw-r--r--libjava/classpath/native/fdlibm/e_atan2.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/libjava/classpath/native/fdlibm/e_atan2.c b/libjava/classpath/native/fdlibm/e_atan2.c
index c75448db26c..94491eecb50 100644
--- a/libjava/classpath/native/fdlibm/e_atan2.c
+++ b/libjava/classpath/native/fdlibm/e_atan2.c
@@ -1,12 +1,12 @@
-/* @(#)e_atan2.c 5.1 93/09/24 */
+/* @(#)e_atan2.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
- * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*
@@ -15,7 +15,7 @@
/* __ieee754_atan2(y,x)
* Method :
* 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
- * 2. Reduce x to positive by (if x and y are unexceptional):
+ * 2. Reduce x to positive by (if x and y are unexceptional):
* ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
@@ -33,9 +33,9 @@
* ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;
*
* Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
* to produce the hexadecimal values shown.
*/
@@ -44,9 +44,9 @@
#ifndef _DOUBLE_IS_32BITS
#ifdef __STDC__
-static const double
+static const double
#else
-static double
+static double
#endif
tiny = 1.0e-300,
zero = 0.0,
@@ -61,7 +61,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
double __ieee754_atan2(y,x)
double y,x;
#endif
-{
+{
double z;
int32_t k,m,hx,hy,ix,iy;
uint32_t lx,ly;
@@ -79,7 +79,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
/* when y = 0 */
if((iy|ly)==0) {
switch(m) {
- case 0:
+ case 0:
case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
@@ -87,7 +87,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
}
/* when x = 0 */
if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
-
+
/* when x is INF */
if(ix==0x7ff00000) {
if(iy==0x7ff00000) {
@@ -116,11 +116,11 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
else z=atan(fabs(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
- case 1: {
- uint32_t zh;
- GET_HIGH_WORD(zh,z);
- SET_HIGH_WORD(z,zh ^ 0x80000000);
- }
+ case 1: {
+ uint32_t zh;
+ GET_HIGH_WORD(zh,z);
+ SET_HIGH_WORD(z, zh ^ 0x80000000);
+ }
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */