aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/mpsqrt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-13 02:01:34 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-13 02:01:34 +0000
commitca58f1dbeb62840dad345d6bfcca18c81db130a8 (patch)
treeeb1b9705fc324e0852875514dda109641e9399de /sysdeps/ieee754/dbl-64/mpsqrt.c
parent9a656848eaa2f9c96ce438eeb3c63e33933c0b2e (diff)
downloadglibc-ca58f1dbeb62840dad345d6bfcca18c81db130a8.tar
glibc-ca58f1dbeb62840dad345d6bfcca18c81db130a8.tar.gz
glibc-ca58f1dbeb62840dad345d6bfcca18c81db130a8.tar.bz2
glibc-ca58f1dbeb62840dad345d6bfcca18c81db130a8.zip
Update.
2001-03-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/ieee754/dbl-64/e_remainder.c: Fix handling of boundary conditions. * sysdeps/ieee754/dbl-64/e_pow.c: Fix handling of boundary conditions. * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Handle Inf and NaN correctly. (__cos): Likewise. * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Handle NaN correctly. (__ieee754_acos): Likewise. redefinition. * sysdeps/ieee754/dbl-64/endian.h: Define also one of BIG_ENDI and LITTLE_ENDI. * sysdeps/ieee754/dbl-64/MathLib.h (Init_Lib): Use void as parameter list.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/mpsqrt.c')
-rw-r--r--sysdeps/ieee754/dbl-64/mpsqrt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.c b/sysdeps/ieee754/dbl-64/mpsqrt.c
index 3a4632bdc9..824c03f746 100644
--- a/sysdeps/ieee754/dbl-64/mpsqrt.c
+++ b/sysdeps/ieee754/dbl-64/mpsqrt.c
@@ -42,7 +42,7 @@
double fastiroot(double);
-void mpsqrt(mp_no *x, mp_no *y, int p) {
+void __mpsqrt(mp_no *x, mp_no *y, int p) {
#include "mpsqrt.h"
int i,m,ex,ey;
@@ -60,19 +60,19 @@ void mpsqrt(mp_no *x, mp_no *y, int p) {
mphalf.e =0; mphalf.d[0] =ONE; mphalf.d[1] =HALFRAD;
mp3halfs.e=1; mp3halfs.d[0]=ONE; mp3halfs.d[1]=ONE; mp3halfs.d[2]=HALFRAD;
- ex=EX; ey=EX/2; cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
- __mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); dbl_mp(dy,&mpu,p);
- mul(&mpxn,&mphalf,&mpz,p);
+ ex=EX; ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
+ __mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); __dbl_mp(dy,&mpu,p);
+ __mul(&mpxn,&mphalf,&mpz,p);
m=mp[p];
for (i=0; i<m; i++) {
- mul(&mpu,&mpu,&mpt1,p);
- mul(&mpt1,&mpz,&mpt2,p);
- sub(&mp3halfs,&mpt2,&mpt1,p);
- mul(&mpu,&mpt1,&mpt2,p);
- cpy(&mpt2,&mpu,p);
+ __mul(&mpu,&mpu,&mpt1,p);
+ __mul(&mpt1,&mpz,&mpt2,p);
+ __sub(&mp3halfs,&mpt2,&mpt1,p);
+ __mul(&mpu,&mpt1,&mpt2,p);
+ __cpy(&mpt2,&mpu,p);
}
- mul(&mpxn,&mpu,y,p); EY += ey;
+ __mul(&mpxn,&mpu,y,p); EY += ey;
return;
}