summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/e_hypot.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2006-04-25 18:15:36 +0000
committerotto <otto@openbsd.org>2006-04-25 18:15:36 +0000
commit55fa043fb614f21583674600aad40928e3543fb2 (patch)
tree925be78444cffad62b1e9f40ecea2984bbe18734 /lib/libm/src/e_hypot.c
parentenable udcf, why not (diff)
downloadwireguard-openbsd-55fa043fb614f21583674600aad40928e3543fb2.tar.xz
wireguard-openbsd-55fa043fb614f21583674600aad40928e3543fb2.zip
Avoid shadowing of external symbols by local variables; whoever
thought up the names of the bessel functions deserves a beating. ok deraadt@
Diffstat (limited to 'lib/libm/src/e_hypot.c')
-rw-r--r--lib/libm/src/e_hypot.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libm/src/e_hypot.c b/lib/libm/src/e_hypot.c
index 1116def0d91..6dc49042b63 100644
--- a/lib/libm/src/e_hypot.c
+++ b/lib/libm/src/e_hypot.c
@@ -30,9 +30,9 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
* where x1 = x with lower 32 bits cleared, x2 = x-x1; else
* 2. if x <= 2y use
- * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
+ * t1*yy1+((x-y)*(x-y)+(t1*y2+t2*y))
* where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
- * y1= y with lower 32 bits chopped, y2 = y-y1.
+ * yy1= y with lower 32 bits chopped, y2 = y-yy1.
*
* NOTE: scaling may be necessary if some argument is too
* large or too tiny
@@ -52,7 +52,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
double
__ieee754_hypot(double x, double y)
{
- double a=x,b=y,t1,t2,y1,y2,w;
+ double a=x,b=y,t1,t2,yy1,y2,w;
int32_t j,k,ha,hb;
GET_HIGH_WORD(ha,x);
@@ -106,13 +106,13 @@ __ieee754_hypot(double x, double y)
w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
} else {
a = a+a;
- y1 = 0;
- SET_HIGH_WORD(y1,hb);
- y2 = b - y1;
+ yy1 = 0;
+ SET_HIGH_WORD(yy1,hb);
+ y2 = b - yy1;
t1 = 0;
SET_HIGH_WORD(t1,ha+0x00100000);
t2 = a - t1;
- w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ w = __ieee754_sqrt(t1*yy1-(w*(-w)-(t1*y2+t2*b)));
}
if(k!=0) {
u_int32_t high;