Mail Archives: djgpp-workers/2002/03/16/08:38:12
As Eli suggested I've run the cygwin test suite with this patch
applied:
Index: djgpp/src/libm/math/ef_j0.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libm/math/ef_j0.c,v
retrieving revision 1.1
diff -p -u -r1.1 ef_j0.c
--- djgpp/src/libm/math/ef_j0.c 1998/02/07 14:13:26 1.1
+++ djgpp/src/libm/math/ef_j0.c 2002/03/16 13:33:47
@@ -13,6 +13,7 @@
* ====================================================
*/
+#include <stdlib.h>
#include "fdlibm.h"
#ifdef __STDC__
@@ -74,7 +75,7 @@ static float zero = 0.0;
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
* y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
*/
- if(ix>0x80000000U) z = (invsqrtpi*cc)/__ieee754_sqrtf(x);
+ if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*cc
)/__ieee754_sqrtf(x) */ ;
else {
u = pzerof(x); v = qzerof(x);
z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(x);
@@ -156,7 +157,7 @@ v04 = 4.4111031494e-10; /* 0x2ff280c2
if ((s*c)<zero) cc = z/ss;
else ss = z/cc;
}
- if(ix>0x80000000U) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
+ if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*s
s)/__ieee754_sqrtf(x) */ ;
else {
u = pzerof(x); v = qzerof(x);
z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
Index: djgpp/src/libm/math/ef_j1.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libm/math/ef_j1.c,v
retrieving revision 1.1
diff -p -u -r1.1 ef_j1.c
--- djgpp/src/libm/math/ef_j1.c 1998/02/07 14:13:26 1.1
+++ djgpp/src/libm/math/ef_j1.c 2002/03/16 13:33:47
@@ -13,6 +13,7 @@
* ====================================================
*/
+#include <stdlib.h>
#include "fdlibm.h"
#ifdef __STDC__
@@ -75,7 +76,7 @@ static float zero = 0.0;
* j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
* y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
*/
- if(ix>0x80000000U) z = (invsqrtpi*cc)/__ieee754_sqrtf(y);
+ if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*cc
)/__ieee754_sqrtf(y) */ ;
else {
u = ponef(y); v = qonef(y);
z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(y);
I didn't see any abort. What should we do now? Remove the if()
completely or leave the abort() in (for safety)?
Right,
MartinS
- Raw text -