summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/e_hypotf.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_hypotf.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_hypotf.c')
-rw-r--r--lib/msun/src/e_hypotf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msun/src/e_hypotf.c b/lib/msun/src/e_hypotf.c
index e921585..5a40918 100644
--- a/lib/msun/src/e_hypotf.c
+++ b/lib/msun/src/e_hypotf.c
@@ -14,7 +14,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: e_hypotf.c,v 1.4 1997/02/22 15:10:13 peter Exp $";
+static char rcsid[] = "$Id: e_hypotf.c,v 1.5 1997/03/05 11:54:00 bde Exp $";
#endif
#include "math.h"
@@ -71,14 +71,14 @@ static char rcsid[] = "$Id: e_hypotf.c,v 1.4 1997/02/22 15:10:13 peter Exp $";
if (w>b) {
SET_FLOAT_WORD(t1,ha&0xfffff000);
t2 = a-t1;
- w = sqrtf(t1*t1-(b*(-b)-t2*(a+t1)));
+ w = __ieee754_sqrtf(t1*t1-(b*(-b)-t2*(a+t1)));
} else {
a = a+a;
SET_FLOAT_WORD(y1,hb&0xfffff000);
y2 = b - y1;
SET_FLOAT_WORD(t1,ha+0x00800000);
t2 = a - t1;
- w = sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+ w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b)));
}
if(k!=0) {
SET_FLOAT_WORD(t1,0x3f800000+(k<<23));
OpenPOWER on IntegriCloud