summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/e_hypot.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-03-09 16:29:29 +0000
committerbde <bde@FreeBSD.org>1997-03-09 16:29:29 +0000
commit6dc700613a5a26417b3b8a3b958664e44dd507fe (patch)
tree328c568ab800325731d7e389e35755b4bacbbfd2 /lib/msun/src/e_hypot.c
parent154b7d3e6c9eb840b8244cd54446d8bab6e56de1 (diff)
downloadFreeBSD-src-6dc700613a5a26417b3b8a3b958664e44dd507fe.zip
FreeBSD-src-6dc700613a5a26417b3b8a3b958664e44dd507fe.tar.gz
Use __ieee754_sqrt() instead of sqrt() internally. Similarly for the
float versions. Using sqrt() was inefficient. Obtained from: NetBSD
Diffstat (limited to 'lib/msun/src/e_hypot.c')
-rw-r--r--lib/msun/src/e_hypot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msun/src/e_hypot.c b/lib/msun/src/e_hypot.c
index 45d921f..b2a577f 100644
--- a/lib/msun/src/e_hypot.c
+++ b/lib/msun/src/e_hypot.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: e_hypot.c,v 1.4 1997/02/22 15:10:12 peter Exp $";
#endif
/* __ieee754_hypot(x,y)
@@ -107,7 +107,7 @@ static char rcsid[] = "$Id$";
t1 = 0;
SET_HIGH_WORD(t1,ha);
t2 = a-t1;
- w = sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
+ w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
} else {
a = a+a;
y1 = 0;
@@ -116,7 +116,7 @@ static char rcsid[] = "$Id$";
t1 = 0;
SET_HIGH_WORD(t1,ha+0x00100000);
t2 = a - t1;
- w = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
}
if(k!=0) {
u_int32_t high;
OpenPOWER on IntegriCloud