This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMU Common Lisp".
The branch, master has been updated via 6ea8fc645c5c60634e864a2741ee897b93a4ef5f (commit) via 917655e7117a29aef38412f3d4eadaae159bebce (commit) from f399fc8dab36676d617b1fa7e1e2c70bc5ddbffa (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 6ea8fc645c5c60634e864a2741ee897b93a4ef5f Author: Raymond Toy toy.raymond@gmail.com Date: Sat Aug 2 15:12:40 2014 -0700
Add parens around && expressions to silence a clang warning.
diff --git a/src/lisp/e_cosh.c b/src/lisp/e_cosh.c index f33ec02..f022ec0 100644 --- a/src/lisp/e_cosh.c +++ b/src/lisp/e_cosh.c @@ -80,7 +80,7 @@ static double one = 1.0, half=0.5, huge = 1.0e300; /* |x| in [log(maxdouble), overflowthresold] */ lx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x); if (ix<0x408633CE || - (ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d)) { + ((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) { w = __ieee754_exp(half*fabs(x)); t = half*w; return t*w; diff --git a/src/lisp/e_sinh.c b/src/lisp/e_sinh.c index 16671a9..8444741 100644 --- a/src/lisp/e_sinh.c +++ b/src/lisp/e_sinh.c @@ -73,7 +73,7 @@ static double one = 1.0, shuge = 1.0e307;
/* |x| in [log(maxdouble), overflowthresold] */ lx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x); - if (ix<0x408633CE || (ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d)) { + if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) { w = __ieee754_exp(0.5*fabs(x)); t = h*w; return t*w;
commit 917655e7117a29aef38412f3d4eadaae159bebce Author: Raymond Toy toy.raymond@gmail.com Date: Sat Aug 2 14:46:44 2014 -0700
Use unions to access the high and low parts of a double and update routine names.
* fdlibm.h: * Correct the names for sin, cos, and tan; they have fdlibm_ prefix. * Declare fdlibm_expm1 and __ieee754_exp. * e_cosh.c: * Use unions * Call fdlibm_expm1 instead of expm1. * e_sinh.c: * Use unions * Call fdlibm_expm1 instead of expm1. * s_tanh.c: * Use unions * Call fdlibm_expm1 instead of expm1.
diff --git a/src/lisp/e_cosh.c b/src/lisp/e_cosh.c index 204017d..f33ec02 100644 --- a/src/lisp/e_cosh.c +++ b/src/lisp/e_cosh.c @@ -50,9 +50,11 @@ static double one = 1.0, half=0.5, huge = 1.0e300; double t,w; int ix; unsigned lx; + union { int i[2]; double d; } ux;
/* High word of |x|. */ - ix = __HI(x); + ux.d = x; + ix = ux.i[HIWORD]; ix &= 0x7fffffff;
/* x is INF or NaN */ @@ -60,7 +62,7 @@ static double one = 1.0, half=0.5, huge = 1.0e300;
/* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */ if(ix<0x3fd62e43) { - t = expm1(fabs(x)); + t = fdlibm_expm1(fabs(x)); w = one+t; if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */ return one+(t*t)/(w+w); diff --git a/src/lisp/e_sinh.c b/src/lisp/e_sinh.c index 8af8a11..16671a9 100644 --- a/src/lisp/e_sinh.c +++ b/src/lisp/e_sinh.c @@ -47,9 +47,11 @@ static double one = 1.0, shuge = 1.0e307; double t,w,h; int ix,jx; unsigned lx; + union { int i[2]; double d; } ux;
/* High word of |x|. */ - jx = __HI(x); + ux.d = x; + jx = ux.i[HIWORD]; ix = jx&0x7fffffff;
/* x is INF or NaN */ @@ -61,7 +63,7 @@ static double one = 1.0, shuge = 1.0e307; if (ix < 0x40360000) { /* |x|<22 */ if (ix<0x3e300000) /* |x|<2**-28 */ if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */ - t = expm1(fabs(x)); + t = fdlibm_expm1(fabs(x)); if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one)); return h*(t+t/(t+one)); } diff --git a/src/lisp/fdlibm.h b/src/lisp/fdlibm.h index 180137b..325d7d4 100644 --- a/src/lisp/fdlibm.h +++ b/src/lisp/fdlibm.h @@ -48,8 +48,11 @@ extern int __kernel_rem_pio2(double*,double*,int,int,int,const int*); extern double __kernel_sin(double x, double y, int iy); extern double __kernel_cos(double x, double y); extern double __kernel_tan(double x, double y, int iy); -extern double sin(double x); -extern double cos(double x); -extern double tan(double x); +extern double fdlibm_sin(double x); +extern double fdlibm_cos(double x); +extern double fdlibm_tan(double x); +extern double fdlibm_expm1(double x); +extern double __ieee754_exp(double x); +
#endif diff --git a/src/lisp/s_tanh.c b/src/lisp/s_tanh.c index 7d77c2e..6b77004 100644 --- a/src/lisp/s_tanh.c +++ b/src/lisp/s_tanh.c @@ -44,17 +44,19 @@ static double one=1.0, two=2.0, tiny = 1.0e-300; #endif
#ifdef __STDC__ - double tanh(double x) + double fdlibm_tanh(double x) #else - double tanh(x) + double fdlibm_tanh(x) double x; #endif { double t,z; int jx,ix; + union { int i[2]; double d; } ux;
/* High word of |x|. */ - jx = __HI(x); + ux.d = x; + jx = ux.i[HIWORD]; ix = jx&0x7fffffff;
/* x is INF or NaN */ @@ -68,10 +70,10 @@ static double one=1.0, two=2.0, tiny = 1.0e-300; if (ix<0x3c800000) /* |x|<2**-55 */ return x*(one+x); /* tanh(small) = small */ if (ix>=0x3ff00000) { /* |x|>=1 */ - t = expm1(two*fabs(x)); + t = fdlibm_expm1(two*fabs(x)); z = one - two/(t+two); } else { - t = expm1(-two*fabs(x)); + t = fdlibm_expm1(-two*fabs(x)); z= -t/(t+two); } /* |x| > 22, return +-1 */
-----------------------------------------------------------------------
Summary of changes: src/lisp/e_cosh.c | 8 +++++--- src/lisp/e_sinh.c | 8 +++++--- src/lisp/fdlibm.h | 9 ++++++--- src/lisp/s_tanh.c | 12 +++++++----- 4 files changed, 23 insertions(+), 14 deletions(-)
hooks/post-receive