diff -c oldstuff/e_fmod.c newstuff/e_fmod.c
*** oldstuff/e_fmod.c	Sat Feb  7 08:47:40 1998
--- newstuff/e_fmod.c	Wed Feb 16 16:14:38 2005
***************
*** 16,22 ****
   * Return x mod y in exact arithmetic
   * Method: shift and subtract
   */
! 
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
--- 16,22 ----
   * Return x mod y in exact arithmetic
   * Method: shift and subtract
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
***************
*** 46,52 ****
--- 46,56 ----
      /* purge off exception values */
  	if((hy|ly)==0||(hx>=0x7ff00000)||	/* y=0,or x not finite */
  	  ((hy|((ly|-ly)>>31))>0x7ff00000))	/* or y is NaN */
+ 	{
+ 	    if (y == 0.0 || (isinf)(x))
+ 	    	errno = EDOM;
  	    return (x*y)/(x*y);
+ 	}
  	if(hx<=hy) {
  	    if((hx<hy)||(lx<ly)) return x;	/* |x|<|y| return x */
  	    if(lx==ly) 
diff -c oldstuff/e_hypot.c newstuff/e_hypot.c
*** oldstuff/e_hypot.c	Sun Oct  4 06:48:40 1998
--- newstuff/e_hypot.c	Thu Feb 17 10:13:12 2005
***************
*** 57,64 ****
  	double a=x,b=y,t1,t2,y_1,y_2,w;
  	__int32_t j,k,ha,hb;
  
  	if (isnan(x) || isnan(y)) return (x-x)/(y-y);
- 	if (isinf(x) || isinf(y)) return __kernel_standard(x, y, 104);
  	GET_HIGH_WORD(ha,x);
  	ha &= 0x7fffffff;
  	GET_HIGH_WORD(hb,y);
--- 57,64 ----
  	double a=x,b=y,t1,t2,y_1,y_2,w;
  	__int32_t j,k,ha,hb;
  
+ 	if (isinf(x) || isinf(y)) return HUGE_VAL;
  	if (isnan(x) || isnan(y)) return (x-x)/(y-y);
  	GET_HIGH_WORD(ha,x);
  	ha &= 0x7fffffff;
  	GET_HIGH_WORD(hb,y);
diff -c oldstuff/e_pow.c newstuff/e_pow.c
*** oldstuff/e_pow.c	Mon Jun 24 15:25:00 2002
--- newstuff/e_pow.c	Thu Feb 17 13:34:00 2005
***************
*** 56,61 ****
--- 56,62 ----
   * to produce the hexadecimal values shown.
   */
  
+ #include <errno.h>
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
***************
*** 143,148 ****
--- 144,161 ----
  	    }		
  	} 
  
+     /* special value of x */
+     if ((x == 0.0) && (y < 0.0))
+     {
+ 	errno = ERANGE;
+ 	z = HUGE_VAL;
+ 
+ 	if (yisint == 1)
+ 	{
+ 	    z = copysign(z, x);
+ 	}
+ 	return z;
+     }
      /* special value of y */
  	if(ly==0) { 	
  	    if (iy==0x7ff00000) {	/* y is +-inf */
diff -c oldstuff/ef_fmod.c newstuff/ef_fmod.c
*** oldstuff/ef_fmod.c	Sat Feb  7 09:13:26 1998
--- newstuff/ef_fmod.c	Thu Feb 17 09:37:58 2005
***************
*** 19,24 ****
--- 19,25 ----
   * Method: shift and subtract
   */
  
+ #include <errno.h>
  #include "fdlibm.h"
  
  #ifdef __STDC__
***************
*** 45,51 ****
--- 46,56 ----
      /* purge off exception values */
  	if(hy==0||(hx>=0x7f800000)||		/* y=0,or x not finite */
  	   (hy>0x7f800000))			/* or y is NaN */
+ 	{
+ 	    if (y == (float)0.0 || (isinff)(x))
+ 	    	errno = EDOM;
  	    return (x*y)/(x*y);
+ 	}
  	if(hx<hy) return x;			/* |x|<|y| return x */
  	if(hx==hy)
  	    return Zero[(__uint32_t)sx>>31];	/* |x|=|y| return x*0*/
diff -c oldstuff/ef_hypot.c newstuff/ef_hypot.c
*** oldstuff/ef_hypot.c	Sun Jun 29 10:24:18 2003
--- newstuff/ef_hypot.c	Sun Feb 20 12:11:34 2005
***************
*** 35,44 ****
  	ux.f = x;
  	uy.f = y;
  
! 	if (isnanf(ux.l) || isnanf(uy.l))
  		return (x-x)/(y-y);
- 	if (isinff(ux.l) || isinff(uy.l))
- 		return __kernel_standard(x, y, 104);
  	GET_FLOAT_WORD(ha,x);
  	ha &= 0x7fffffff;
  	GET_FLOAT_WORD(hb,y);
--- 35,44 ----
  	ux.f = x;
  	uy.f = y;
  
! 	if ((isinff)(x) || (isinff)(y))
! 		return infinityf();
! 	if ((isnanf)(x) || (isnanf)(y))
  		return (x-x)/(y-y);
  	GET_FLOAT_WORD(ha,x);
  	ha &= 0x7fffffff;
  	GET_FLOAT_WORD(hb,y);
***************
*** 47,53 ****
  	SET_FLOAT_WORD(a,ha);	/* a <- |a| */
  	SET_FLOAT_WORD(b,hb);	/* b <- |b| */
  	t1 = (a > 0) ? (a/b) : 0;
! 	if ((t1 >= SQRT_FLT_MAX) && finitef(ux.l) && finitef(uy.l))
  		return __kernel_standard(x, y, 104);
  	t1 *= t1;
  	t2 = sqrtf(++t1);
--- 47,53 ----
  	SET_FLOAT_WORD(a,ha);	/* a <- |a| */
  	SET_FLOAT_WORD(b,hb);	/* b <- |b| */
  	t1 = (a > 0) ? (a/b) : 0;
! 	if ((t1 >= SQRT_FLT_MAX) && (finitef)(x) && (finitef)(y))
  		return __kernel_standard(x, y, 104);
  	t1 *= t1;
  	t2 = sqrtf(++t1);
diff -c oldstuff/ef_scalb.c newstuff/ef_scalb.c
*** oldstuff/ef_scalb.c	Sun Jun 29 10:24:18 2003
--- newstuff/ef_scalb.c	Sun Feb 20 12:12:56 2005
***************
*** 42,49 ****
  	ux.f = x;
  	ufn.f = fn;
  	
! 	if (isnanf(ux.l)||isnanf(ufn.l)) return x*fn;
! 	if (!finitef(ufn.f)) {
  	    if(fn>(float)0.0) return x*fn;
  	    else       return x/(-fn);
  	}
--- 42,49 ----
  	ux.f = x;
  	ufn.f = fn;
  	
! 	if ((isnanf)(x)||(isnanf)(fn)) return x*fn;
! 	if (!(finitef)(fn)) {
  	    if(fn>(float)0.0) return x*fn;
  	    else       return x/(-fn);
  	}
diff -c oldstuff/k_standard.c newstuff/k_standard.c
*** oldstuff/k_standard.c	Sun Oct  4 06:48:42 1998
--- newstuff/k_standard.c	Thu Feb 17 14:19:40 2005
***************
*** 371,377 ****
  		if (_LIB_VERSION == _SVID_)
  		  exc.retval = -HUGE;
  		else
! 		  exc.retval = -HUGE_VAL;
  		if (_LIB_VERSION == _POSIX_)
  		  errno = EDOM;
  		else if (!matherr(&exc)) {
--- 371,377 ----
  		if (_LIB_VERSION == _SVID_)
  		  exc.retval = -HUGE;
  		else
! 		  exc.retval = nan();
  		if (_LIB_VERSION == _POSIX_)
  		  errno = EDOM;
  		else if (!matherr(&exc)) {
***************
*** 470,478 ****
  		if (_LIB_VERSION == _SVID_) 
  		  exc.retval = zero;
  		else
! 		  exc.retval = -HUGE_VAL;
  		if (_LIB_VERSION == _POSIX_)
! 		  errno = EDOM;
  		else if (!matherr(&exc)) {
  		  if (_LIB_VERSION == _SVID_) {
  			(void) WRITE2("pow(0,neg): DOMAIN error\n", 25);
--- 470,478 ----
  		if (_LIB_VERSION == _SVID_) 
  		  exc.retval = zero;
  		else
! 		  exc.retval = copysign(HUGE_VAL, x);
  		if (_LIB_VERSION == _POSIX_)
! 		  errno = ERANGE;
  		else if (!matherr(&exc)) {
  		  if (_LIB_VERSION == _SVID_) {
  			(void) WRITE2("pow(0,neg): DOMAIN error\n", 25);
diff -c oldstuff/s_cos.c newstuff/s_cos.c
*** oldstuff/s_cos.c	Tue Apr 15 04:39:48 1997
--- newstuff/s_cos.c	Wed Feb 16 14:53:14 2005
***************
*** 42,47 ****
--- 42,48 ----
   *	TRIG(x) returns trig(x) nearly rounded 
   */
  
+ #include <errno.h>
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
***************
*** 64,70 ****
  	if(ix <= 0x3fe921fb) return __kernel_cos(x,z);
  
      /* cos(Inf or NaN) is NaN */
! 	else if (ix>=0x7ff00000) return x-x;
  
      /* argument reduction needed */
  	else {
--- 65,78 ----
  	if(ix <= 0x3fe921fb) return __kernel_cos(x,z);
  
      /* cos(Inf or NaN) is NaN */
! 	else if (ix>=0x7ff00000)
! 	{
! 	    if (isinf(x))
! 	    {
! 		errno = EDOM;
! 	    }
! 	    return x-x;
! 	}
  
      /* argument reduction needed */
  	else {
diff -c oldstuff/s_expm1.c newstuff/s_expm1.c
*** oldstuff/s_expm1.c	Mon Jul  6 12:00:58 1998
--- newstuff/s_expm1.c	Wed Feb 16 15:46:00 2005
***************
*** 148,154 ****
   * compiler will convert from decimal to binary accurately enough
   * to produce the hexadecimal values shown.
   */
! 
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
--- 148,154 ----
   * compiler will convert from decimal to binary accurately enough
   * to produce the hexadecimal values shown.
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
***************
*** 198,204 ****
  		         return x+x; 	 /* NaN */
  		    else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
  	        }
! 	        if(x > o_threshold) return huge*huge; /* overflow */
  	    }
  	    if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */
  		if(x+tiny<0.0)		/* raise inexact */
--- 198,208 ----
  		         return x+x; 	 /* NaN */
  		    else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
  	        }
! 	        if(x > o_threshold) 
! 		{
! 		    errno = ERANGE;
! 		    return huge*huge; /* overflow */
! 		}    		
  	    }
  	    if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */
  		if(x+tiny<0.0)		/* raise inexact */
diff -c oldstuff/s_tan.c newstuff/s_tan.c
*** oldstuff/s_tan.c	Tue Apr 15 04:39:50 1997
--- newstuff/s_tan.c	Fri Feb 18 11:19:14 2005
***************
*** 78,84 ****
   * Accuracy:
   *	TRIG(x) returns trig(x) nearly rounded 
   */
! 
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
--- 78,84 ----
   * Accuracy:
   *	TRIG(x) returns trig(x) nearly rounded 
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
***************
*** 101,107 ****
  	if(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);
  
      /* tan(Inf or NaN) is NaN */
! 	else if (ix>=0x7ff00000) return x-x;		/* NaN */
  
      /* argument reduction needed */
  	else {
--- 101,114 ----
  	if(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);
  
      /* tan(Inf or NaN) is NaN */
! 	else if (ix>=0x7ff00000) 
! 	{
! 	    if ((isinf)(x))
! 	    {
! 	    	errno = EDOM;
! 	    }			       
! 	    return x-x;		/* NaN */
! 	}	
  
      /* argument reduction needed */
  	else {
diff -c oldstuff/s_tanh.c newstuff/s_tanh.c
*** oldstuff/s_tanh.c	Tue Apr 15 04:39:50 1997
--- newstuff/s_tanh.c	Tue Feb  3 15:30:58 2004
***************
*** 76,84 ****
   *	tanh(NaN) is NaN;
   *	only tanh(0)=0 is exact for finite argument.
   */
! 
  #include "fdlibm.h"
! 
  #ifndef _DOUBLE_IS_32BITS
  
  #ifdef __STDC__
--- 76,84 ----
   *	tanh(NaN) is NaN;
   *	only tanh(0)=0 is exact for finite argument.
   */
! #include <errno.h>
  #include "fdlibm.h"
! #include <float.h>
  #ifndef _DOUBLE_IS_32BITS
  
  #ifdef __STDC__
***************
*** 110,116 ****
--- 110,123 ----
      /* |x| < 22 */
  	if (ix < 0x40360000) {		/* |x|<22 */
  	    if (ix<0x3c800000) 		/* |x|<2**-55 */
+ 	    {
+ 	    	if (x == 0) return x;
+ 	    	if (fabs(x) < DBL_MIN)
+ 		{
+ 		    errno = ERANGE;
+ 		}    		       
  		return x*(one+x);    	/* tanh(small) = small */
+ 	    }			
  	    if (ix>=0x3ff00000) {	/* |x|>=1  */
  		t = expm1(two*fabs(x));
  		z = one - two/(t+two);
diff -c oldstuff/sf_cos.c newstuff/sf_cos.c
*** oldstuff/sf_cos.c	Tue Apr 15 04:39:52 1997
--- newstuff/sf_cos.c	Wed Feb 16 15:03:48 2005
***************
*** 12,18 ****
   * is preserved.
   * ====================================================
   */
! 
  #include "fdlibm.h"
  
  #ifdef __STDC__
--- 12,18 ----
   * is preserved.
   * ====================================================
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifdef __STDC__
***************
*** 38,44 ****
  	if(ix <= 0x3f490fd8) return __kernel_cosf(x,z);
  
      /* cos(Inf or NaN) is NaN */
! 	else if (ix>=0x7f800000) return x-x;
  
      /* argument reduction needed */
  	else {
--- 38,51 ----
  	if(ix <= 0x3f490fd8) return __kernel_cosf(x,z);
  
      /* cos(Inf or NaN) is NaN */
! 	else if (ix>=0x7f800000)
! 	{
! 	    if ((isinff)(x))
! 	    {
! 		errno = EDOM;
! 	    }
! 	    return x-x;
! 	}
  
      /* argument reduction needed */
  	else {
diff -c oldstuff/sf_expm1.c newstuff/sf_expm1.c
*** oldstuff/sf_expm1.c	Mon Jul  6 12:03:52 1998
--- newstuff/sf_expm1.c	Wed Feb 16 15:50:52 2005
***************
*** 13,18 ****
--- 13,19 ----
   * ====================================================
   */
  
+ #include <errno.h>
  #include "fdlibm.h"
  
  #ifdef __v810__
***************
*** 61,67 ****
  		    return x+x; 	 /* NaN */
  		if(hx==0x7f800000)
  		    return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
! 	        if(x > o_threshold) return huge*huge; /* overflow */
  	    }
  	    if(xsb!=0) { /* x < -27*ln2, return -1.0 with inexact */
  		if(x+tiny<(float)0.0)	/* raise inexact */
--- 62,72 ----
  		    return x+x; 	 /* NaN */
  		if(hx==0x7f800000)
  		    return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
! 	        if(x > o_threshold) 
! 		{
! 		    errno = ERANGE;
! 		    return huge*huge; /* overflow */
! 		}    		
  	    }
  	    if(xsb!=0) { /* x < -27*ln2, return -1.0 with inexact */
  		if(x+tiny<(float)0.0)	/* raise inexact */
diff -c oldstuff/sf_ldexp.c newstuff/sf_ldexp.c
*** oldstuff/sf_ldexp.c	Sun Jun 29 10:24:18 2003
--- newstuff/sf_ldexp.c	Thu Feb 17 11:26:44 2005
***************
*** 29,37 ****
  	
  	uvalue.f = value;
  
! 	if(!finitef(uvalue.l)||value==(float)0.0) return value;
  	value = scalbnf(value,expon);
! 	if(!finitef(uvalue.l)||
  	   (value < FLT_MIN && value > -FLT_MIN)) errno = ERANGE;
  	return value;
  }
--- 29,37 ----
  	
  	uvalue.f = value;
  
! 	if(!(finitef)(value)||value==(float)0.0) return value;
  	value = scalbnf(value,expon);
! 	if(!(finitef)(value)||
  	   (value < FLT_MIN && value > -FLT_MIN)) errno = ERANGE;
  	return value;
  }
diff -c oldstuff/sf_tan.c newstuff/sf_tan.c
*** oldstuff/sf_tan.c	Tue Apr 15 04:39:52 1997
--- newstuff/sf_tan.c	Fri Feb 18 11:17:34 2005
***************
*** 12,18 ****
   * is preserved.
   * ====================================================
   */
! 
  #include "fdlibm.h"
  
  #ifdef __STDC__
--- 12,18 ----
   * is preserved.
   * ====================================================
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifdef __STDC__
***************
*** 32,39 ****
  	if(ix <= 0x3f490fda) return __kernel_tanf(x,z,1);
  
      /* tan(Inf or NaN) is NaN */
! 	else if (ix>=0x7f800000) return x-x;		/* NaN */
! 
      /* argument reduction needed */
  	else {
  	    n = __ieee754_rem_pio2f(x,y);
--- 32,45 ----
  	if(ix <= 0x3f490fda) return __kernel_tanf(x,z,1);
  
      /* tan(Inf or NaN) is NaN */
! 	else if (ix>=0x7f800000)
! 	{
! 	    if ((isinff)(x))
! 	    {
! 	    	errno = EDOM;
! 	    }			       
! 	    return x-x;		/* NaN */
! 	}
      /* argument reduction needed */
  	else {
  	    n = __ieee754_rem_pio2f(x,y);
diff -c oldstuff/sf_tanh.c newstuff/sf_tanh.c
*** oldstuff/sf_tanh.c	Tue Apr 15 04:39:54 1997
--- newstuff/sf_tanh.c	Tue Feb  3 15:33:30 2004
***************
*** 12,19 ****
   * is preserved.
   * ====================================================
   */
! 
  #include "fdlibm.h"
  
  #ifdef __STDC__
  static const float one=1.0, two=2.0, tiny = 1.0e-30;
--- 12,20 ----
   * is preserved.
   * ====================================================
   */
! #include <errno.h>
  #include "fdlibm.h"
+ #include <float.h>
  
  #ifdef __STDC__
  static const float one=1.0, two=2.0, tiny = 1.0e-30;
***************
*** 36,49 ****
  
      /* x is INF or NaN */
  	if(ix>=0x7f800000) { 
! 	    if (jx>=0) return one/x+one;    /* tanh(+-inf)=+-1 */
! 	    else       return one/x-one;    /* tanh(NaN) = NaN */
  	}
  
      /* |x| < 22 */
  	if (ix < 0x41b00000) {		/* |x|<22 */
  	    if (ix<0x24000000) 		/* |x|<2**-55 */
! 		return x*(one+x);    	/* tanh(small) = small */
  	    if (ix>=0x3f800000) {	/* |x|>=1  */
  		t = expm1f(two*fabsf(x));
  		z = one - two/(t+two);
--- 37,57 ----
  
      /* x is INF or NaN */
  	if(ix>=0x7f800000) { 
! 	    if (jx>=0) return one/x+one;    /* tanhf(+-inf)=+-1 */
! 	    else       return one/x-one;    /* tanhf(NaN) = NaN */
  	}
  
      /* |x| < 22 */
  	if (ix < 0x41b00000) {		/* |x|<22 */
  	    if (ix<0x24000000) 		/* |x|<2**-55 */
! 	    {
! 	    	if (x == 0) return x;
! 	    	if (fabsf(x) < FLT_MIN)
! 		{
! 		    errno = ERANGE;
! 		}    		       
! 		return x*(one+x);    	/* tanhf(small) = small */
! 	    }			
  	    if (ix>=0x3f800000) {	/* |x|>=1  */
  		t = expm1f(two*fabsf(x));
  		z = one - two/(t+two);
diff -c oldstuff/w_cosh.c newstuff/w_cosh.c
*** oldstuff/w_cosh.c	Tue Apr 15 04:39:54 1997
--- newstuff/w_cosh.c	Wed Feb 16 15:27:58 2005
***************
*** 81,87 ****
  #else
  	double z;
  	z = __ieee754_cosh(x);
! 	if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
  	if(fabs(x)>7.10475860073943863426e+02) {	
  	        return __kernel_standard(x,x,5); /* cosh overflow */
  	} else
--- 81,88 ----
  #else
  	double z;
  	z = __ieee754_cosh(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnan)(x)) return z;
! 	if ((isinf)(x)) return z;
  	if(fabs(x)>7.10475860073943863426e+02) {	
  	        return __kernel_standard(x,x,5); /* cosh overflow */
  	} else
diff -c oldstuff/w_pow.c newstuff/w_pow.c
*** oldstuff/w_pow.c	Tue Apr 15 04:39:54 1997
--- newstuff/w_pow.c	Thu Feb 17 15:58:32 2005
***************
*** 59,74 ****
--- 59,113 ----
   * wrapper pow(x,y) return x**y
   */
  
+ #include <errno.h>
  #include "fdlibm.h"
+ #include <stdio.h>
  
  #ifndef _DOUBLE_IS_32BITS
  
+ static double one = 1.0;
+ 
+ static
+ double powx(double, double);
+ 
+ double pow(double x, double y)
+ {
+     double Retval;
+ 
+     if (x == one)
+     {
+     	Retval = x;
+     }
+     else if ((x == -one) && isinf(y))
+     {
+          Retval = one;
+     }
+     else
+     {
+ 	Retval = powx(x,y);
+ 	if ((isnan)(Retval))
+ 	{
+ 	     Retval = nan();
+ 	}
+     }
+     return Retval;
+ }
+ 
+ static
+ #ifdef __STDC__
+ 	double powx(double x, double y)	/* wrapper pow */
+ #else
+ 	double powx(x,y)			/* wrapper pow */
+ 	double x,y;
+ #endif
+ # if 0
  #ifdef __STDC__
  	double pow(double x, double y)	/* wrapper pow */
  #else
  	double pow(x,y)			/* wrapper pow */
  	double x,y;
  #endif
+ # endif
  {
  #ifdef _IEEE_LIBM
  	return  __ieee754_pow(x,y);
***************
*** 85,92 ****
  	if(x==0.0){ 
  	    if(y==0.0)
  	        return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
! 	    if(finite(y)&&y<0.0)
! 	        return __kernel_standard(x,y,23); /* pow(0.0,negative) */
  	    return z;
  	}
  	if(!finite(z)) {
--- 124,132 ----
  	if(x==0.0){ 
  	    if(y==0.0)
  	        return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
! 	    
! 	    //if((finite)(y)&&y<0.0)
! 	    //   return __kernel_standard(x,y,23); /* pow(0.0,negative) */
  	    return z;
  	}
  	if(!finite(z)) {
diff -c oldstuff/w_remainder.c newstuff/w_remainder.c
*** oldstuff/w_remainder.c	Tue Apr 15 04:39:54 1997
--- newstuff/w_remainder.c	Fri Feb 18 14:50:16 2005
***************
*** 58,65 ****
  /* 
   * wrapper remainder(x,p)
   */
! 
  #include "fdlibm.h"
  
  #ifndef _DOUBLE_IS_32BITS
  
--- 58,66 ----
  /* 
   * wrapper remainder(x,p)
   */
! #include <errno.h>
  #include "fdlibm.h"
+ #include <stdio.h>
  
  #ifndef _DOUBLE_IS_32BITS
  
***************
*** 75,86 ****
  #else
  	double z;
  	z = __ieee754_remainder(x,y);
! 	if(_LIB_VERSION == _IEEE_ || isnan(y)) return z;
! 	if(y==0.0) 
! 	    return __kernel_standard(x,y,28); /* remainder(x,0) */
! 	else
! 	    return z;
  #endif
  }
  
! #endif /* defined(_DOUBLE_IS_32BITS) */
--- 76,98 ----
  #else
  	double z;
  	z = __ieee754_remainder(x,y);
! 	if(_LIB_VERSION == _IEEE_) return z;
! 	if ((isnan)(x) || (isnan)(y))
! 	{
! 	    return nan();
! 	}
! 	if (isinf(x) || (y==0.0))
! 	{
! 	    errno = EDOM;
! 	    return nan();
! 	}
! 	if (isinf(y))
! 	    return x;
! //	    return __kernel_standard(x,y,28); /* remainder(x,0) */
! //	else
! 
! 	return z;
  #endif
  }
  
! #endif /* !defined(_DOUBLE_IS_32BITS) */
diff -c oldstuff/wf_acos.c newstuff/wf_acos.c
*** oldstuff/wf_acos.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_acos.c	Sat Feb 19 13:37:20 2005
***************
*** 20,26 ****
  #include "fdlibm.h"
  #include <libc/ieee.h>
  
! #ifdef _HAVE_STDC
  	float acosf(float x)		/* wrapper acosf */
  #else
  	float acosf(x)			/* wrapper acosf */
--- 20,26 ----
  #include "fdlibm.h"
  #include <libc/ieee.h>
  
! #ifdef __STDC__
  	float acosf(float x)		/* wrapper acosf */
  #else
  	float acosf(x)			/* wrapper acosf */
***************
*** 36,42 ****
  	ux.f = x;
  
  	z = __ieee754_acosf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(fabsf(x)>(float)1.0) {
  	        /* acosf(|x|>1) */
  	        return (float)__kernel_standard((double)x,(double)x,101);
--- 36,42 ----
  	ux.f = x;
  
  	z = __ieee754_acosf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
  	if(fabsf(x)>(float)1.0) {
  	        /* acosf(|x|>1) */
  	        return (float)__kernel_standard((double)x,(double)x,101);
diff -c oldstuff/wf_acosh.c newstuff/wf_acosh.c
*** oldstuff/wf_acosh.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_acosh.c	Sat Feb 19 13:37:20 2005
***************
*** 37,43 ****
  	ux.f = x;
  
  	z = __ieee754_acoshf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(x<(float)1.0) {
  		/* acosh(x<1) */
  	        return (float)__kernel_standard((double)x,(double)x,129);
--- 37,43 ----
  	ux.f = x;
  
  	z = __ieee754_acoshf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
  	if(x<(float)1.0) {
  		/* acosh(x<1) */
  	        return (float)__kernel_standard((double)x,(double)x,129);
diff -c oldstuff/wf_asin.c newstuff/wf_asin.c
*** oldstuff/wf_asin.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_asin.c	Sat Feb 19 13:37:20 2005
***************
*** 38,44 ****
  	ux.f = x;
  
  	z = __ieee754_asinf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(fabsf(x)>(float)1.0) {
  	    /* asinf(|x|>1) */
  	    return (float)__kernel_standard((double)x,(double)x,102);
--- 38,44 ----
  	ux.f = x;
  
  	z = __ieee754_asinf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
  	if(fabsf(x)>(float)1.0) {
  	    /* asinf(|x|>1) */
  	    return (float)__kernel_standard((double)x,(double)x,102);
diff -c oldstuff/wf_atan2.c newstuff/wf_atan2.c
*** oldstuff/wf_atan2.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_atan2.c	Sat Feb 19 13:37:20 2005
***************
*** 39,45 ****
  	uy.f = y;
  
  	z = __ieee754_atan2f(y,x);
! 	if(_LIB_VERSION == _IEEE_||isnanf(ux.l)||isnanf(uy.l)) return z;
  	if(x==(float)0.0&&y==(float)0.0) {
  		/* atan2f(+-0,+-0) */
  	        return (float)__kernel_standard((double)y,(double)x,103);
--- 39,45 ----
  	uy.f = y;
  
  	z = __ieee754_atan2f(y,x);
! 	if(_LIB_VERSION == _IEEE_||(isnanf)(ux.l)||(isnanf)(uy.l)) return z;
  	if(x==(float)0.0&&y==(float)0.0) {
  		/* atan2f(+-0,+-0) */
  	        return (float)__kernel_standard((double)y,(double)x,103);
diff -c oldstuff/wf_atanh.c newstuff/wf_atanh.c
*** oldstuff/wf_atanh.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_atanh.c	Sat Feb 19 13:37:20 2005
***************
*** 35,41 ****
  	ux.f = x;
  	
  	z = __ieee754_atanhf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	y = fabsf(x);
  	if(y>=(float)1.0) {
  	    if(y>(float)1.0)
--- 35,41 ----
  	ux.f = x;
  	
  	z = __ieee754_atanhf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
  	y = fabsf(x);
  	if(y>=(float)1.0) {
  	    if(y>(float)1.0)
diff -c oldstuff/wf_cosh.c newstuff/wf_cosh.c
*** oldstuff/wf_cosh.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_cosh.c	Sat Feb 19 13:37:20 2005
***************
*** 36,42 ****
  	ux.f = x;
  
  	z = __ieee754_coshf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(fabsf(x)>(float)8.9415985107e+01) {	
  		/* cosh overflow */
  	        return (float)__kernel_standard((double)x,(double)x,105);
--- 36,43 ----
  	ux.f = x;
  
  	z = __ieee754_coshf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
! 	if ((isinff)(x)) return z;
  	if(fabsf(x)>(float)8.9415985107e+01) {	
  		/* cosh overflow */
  	        return (float)__kernel_standard((double)x,(double)x,105);
diff -c oldstuff/wf_exp.c newstuff/wf_exp.c
*** oldstuff/wf_exp.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_exp.c	Sat Feb 19 13:42:38 2005
***************
*** 45,51 ****
  
  	z = __ieee754_expf(x);
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if(finitef(ux.l)) {
  	    if(x>o_threshold)
  	        /* exp overflow */
  	        return (float)__kernel_standard((double)x,(double)x,106);
--- 45,51 ----
  
  	z = __ieee754_expf(x);
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if((finitef)(ux.l)) {
  	    if(x>o_threshold)
  	        /* exp overflow */
  	        return (float)__kernel_standard((double)x,(double)x,106);
diff -c oldstuff/wf_fmod.c newstuff/wf_fmod.c
*** oldstuff/wf_fmod.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_fmod.c	Sun Feb 20 12:21:48 2005
***************
*** 16,22 ****
  /* 
   * wrapper fmodf(x,y)
   */
- 
  #include "fdlibm.h"
  #include <libc/ieee.h>
  
--- 16,21 ----
***************
*** 38,44 ****
  	uy.f = y;
  
  	z = __ieee754_fmodf(x,y);
! 	if(_LIB_VERSION == _IEEE_ ||isnanf(uy.f)||isnanf(ux.f)) return z;
  	if(y==(float)0.0) {
  		/* fmodf(x,0) */
  	        return (float)__kernel_standard((double)x,(double)y,127);
--- 37,43 ----
  	uy.f = y;
  
  	z = __ieee754_fmodf(x,y);
! 	if(_LIB_VERSION == _IEEE_ ||(isnanf)(y)||(isnanf)(x)) return z;
  	if(y==(float)0.0) {
  		/* fmodf(x,0) */
  	        return (float)__kernel_standard((double)x,(double)y,127);
diff -c oldstuff/wf_gamma.c newstuff/wf_gamma.c
*** oldstuff/wf_gamma.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_gamma.c	Sun Feb 20 12:30:38 2005
***************
*** 36,42 ****
          y = __ieee754_gammaf_r(x,&signgam);
  		uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!         if(!finitef(uy.f)&&finitef(ux.f)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* gammaf pole */
                  return (float)__kernel_standard((double)x,(double)x,141);
--- 36,42 ----
          y = __ieee754_gammaf_r(x,&signgam);
  		uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!         if(!(finitef)(y)&&(finitef)(x)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* gammaf pole */
                  return (float)__kernel_standard((double)x,(double)x,141);
diff -c oldstuff/wf_hypot.c newstuff/wf_hypot.c
*** oldstuff/wf_hypot.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_hypot.c	Sun Feb 20 12:30:38 2005
***************
*** 41,47 ****
  	z = __ieee754_hypotf(x,y);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if((!finitef(uz.l))&&finitef(ux.l)&&finitef(uy.l))
  	    /* hypot overflow */
  	    return (float)__kernel_standard((double)x,(double)y,104);
  	else
--- 41,47 ----
  	z = __ieee754_hypotf(x,y);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if((!(finitef)(z))&&(finitef)(x)&&(finitef)(y))
  	    /* hypot overflow */
  	    return (float)__kernel_standard((double)x,(double)y,104);
  	else
diff -c oldstuff/wf_j0.c newstuff/wf_j0.c
*** oldstuff/wf_j0.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_j0.c	Sun Feb 20 12:30:38 2005
***************
*** 35,41 ****
  	ux.f = x;
  
  	z = __ieee754_j0f(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  		/* j0f(|x|>X_TLOSS) */
  	        return (float)__kernel_standard((double)x,(double)x,134);
--- 35,41 ----
  	ux.f = x;
  
  	z = __ieee754_j0f(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l)) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  		/* j0f(|x|>X_TLOSS) */
  	        return (float)__kernel_standard((double)x,(double)x,134);
***************
*** 60,66 ****
  	ux.f = x;
  
  	z = __ieee754_y0f(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
--- 60,66 ----
  	ux.f = x;
  
  	z = __ieee754_y0f(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
diff -c oldstuff/wf_j1.c newstuff/wf_j1.c
*** oldstuff/wf_j1.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_j1.c	Sun Feb 20 12:30:38 2005
***************
*** 37,43 ****
  	ux.f = x;
  
  	z = __ieee754_j1f(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) ) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  		/* j1(|x|>X_TLOSS) */
  	        return (float)__kernel_standard((double)x,(double)x,136);
--- 37,43 ----
  	ux.f = x;
  
  	z = __ieee754_j1f(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(ux.l) ) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  		/* j1(|x|>X_TLOSS) */
  	        return (float)__kernel_standard((double)x,(double)x,136);
***************
*** 62,68 ****
  	ux.f = x;
  
  	z = __ieee754_y1f(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
--- 62,68 ----
  	ux.f = x;
  
  	z = __ieee754_y1f(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
diff -c oldstuff/wf_jn.c newstuff/wf_jn.c
*** oldstuff/wf_jn.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_jn.c	Sun Feb 20 12:32:44 2005
***************
*** 33,39 ****
  	ux.f = x;
  
  	z = __ieee754_jnf(n,x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) ) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  	    /* jn(|x|>X_TLOSS,n) */
  	    return (float)__kernel_standard((double)n,(double)x,138);
--- 33,39 ----
  	ux.f = x;
  
  	z = __ieee754_jnf(n,x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x) ) return z;
  	if(fabsf(x)>(float)X_TLOSS) {
  	    /* jn(|x|>X_TLOSS,n) */
  	    return (float)__kernel_standard((double)n,(double)x,138);
***************
*** 58,64 ****
  	ux.f = x;
  
  	z = __ieee754_ynf(n,x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
--- 58,64 ----
  	ux.f = x;
  
  	z = __ieee754_ynf(n,x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x) ) return z;
          if(x <= (float)0.0){
                  if(x==(float)0.0)
                      /* d= -one/(x-x); */
diff -c oldstuff/wf_lgamma.c newstuff/wf_lgamma.c
*** oldstuff/wf_lgamma.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_lgamma.c	Sun Feb 20 12:35:46 2005
***************
*** 36,42 ****
      y = __ieee754_lgammaf_r(x,&signgam);
  	uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!     if(!finitef(uy.l)&&finitef(ux.l)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* lgamma pole */
                  return (float)__kernel_standard((double)x,(double)x,115);
--- 36,42 ----
      y = __ieee754_lgammaf_r(x,&signgam);
  	uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!     if(!(finitef)(y)&&(finitef)(x)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* lgamma pole */
                  return (float)__kernel_standard((double)x,(double)x,115);
diff -c oldstuff/wf_log.c newstuff/wf_log.c
*** oldstuff/wf_log.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_log.c	Sun Feb 20 12:36:44 2005
***************
*** 36,42 ****
  	ux.f = x;
  
  	z = __ieee754_logf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l) || x > (float)0.0) return z;
  	if(x==(float)0.0)
  	    /* logf(0) */
  	    return (float)__kernel_standard((double)x,(double)x,116);
--- 36,42 ----
  	ux.f = x;
  
  	z = __ieee754_logf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x) || x > (float)0.0) return z;
  	if(x==(float)0.0)
  	    /* logf(0) */
  	    return (float)__kernel_standard((double)x,(double)x,116);
diff -c oldstuff/wf_log10.c newstuff/wf_log10.c
*** oldstuff/wf_log10.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_log10.c	Sun Feb 20 12:39:16 2005
***************
*** 36,42 ****
  	ux.f = x;
  
  	z = __ieee754_log10f(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(x<=(float)0.0) {
  	    if(x==(float)0.0)
  	        /* log10(0) */
--- 36,42 ----
  	ux.f = x;
  
  	z = __ieee754_log10f(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x)) return z;
  	if(x<=(float)0.0) {
  	    if(x==(float)0.0)
  	        /* log10(0) */
diff -c oldstuff/wf_pow.c newstuff/wf_pow.c
*** oldstuff/wf_pow.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_pow.c	Fri Feb 18 14:55:08 2005
***************
*** 16,47 ****
  /* 
   * wrapper powf(x,y) return x**y
   */
  #include <float.h>
- #include <libc/ieee.h>
  #include "fdlibm.h"
  
  #ifdef __STDC__
! 	float powf(float x, float y)	/* wrapper powf */
  #else
! 	float powf(x,y)			/* wrapper powf */
  	float x,y;
  #endif
  {
  #ifdef _IEEE_LIBM
  	return  __ieee754_powf(x,y);
  #else
- 	_float_long_union ux;
- 	_float_long_union uy;
- 	_float_long_union uz;
  	float z;
- 
- 	ux.f = x;
- 	uy.f = y;
- 
  	z=__ieee754_powf(x,y);
! 	uz.f = z;
! 	if(_LIB_VERSION == _IEEE_|| isnanf(uy.l)) return z;
! 	if(isnanf(ux.l)) {
  	    if(y==(float)0.0) 
  	        /* powf(NaN,0.0) */
  	        return (float)__kernel_standard((double)x,(double)y,142);
--- 16,67 ----
  /* 
   * wrapper powf(x,y) return x**y
   */
+ #include <errno.h>
  #include <float.h>
  #include "fdlibm.h"
  
+ static double one = 1.0;
+ 
+ static	float powfx(float, float);
+ 
+ float powf(float x, float y)
+ {
+     float Retval;
+ 
+     if (x == one)
+     {
+     	Retval = x;
+     }
+     else if ((x == -one) && (isinff)(y))
+     {
+          Retval = one;
+     }
+     else
+     {
+ 	Retval = powfx(x,y);
+ 	if ((isnanf)(Retval))
+ 	{
+ 	     Retval = nanf();
+ 	}
+     }
+     return Retval;
+ }
+ 
+ static
  #ifdef __STDC__
! 	float powfx(float x, float y)	/* wrapper powf */
  #else
! 	float powfx(x,y)			/* wrapper powf */
  	float x,y;
  #endif
  {
  #ifdef _IEEE_LIBM
  	return  __ieee754_powf(x,y);
  #else
  	float z;
  	z=__ieee754_powf(x,y);
! 	if(_LIB_VERSION == _IEEE_|| (isnanf)(y)) return z;
! 	if((isnanf)(x)) {
  	    if(y==(float)0.0) 
  	        /* powf(NaN,0.0) */
  	        return (float)__kernel_standard((double)x,(double)y,142);
***************
*** 52,65 ****
  	    if(y==(float)0.0)
  	        /* powf(0.0,0.0) */
  	        return (float)__kernel_standard((double)x,(double)y,120);
! 	    if(finitef(uy.l)&&y<(float)0.0)
  	        /* powf(0.0,negative) */
! 	        return (float)__kernel_standard((double)x,(double)y,123);
  	    return z;
  	}
! 	if(!finitef(uz.l )) {
! 	    if(finitef(ux.l)&&finitef(uy.l)) {
! 	        if(isnanf(uz.l))
  		    /* powf neg**non-int */
  	            return (float)__kernel_standard((double)x,(double)y,124);
  	        else 
--- 72,88 ----
  	    if(y==(float)0.0)
  	        /* powf(0.0,0.0) */
  	        return (float)__kernel_standard((double)x,(double)y,120);
! 	    if((finitef)(y)&&y<(float)0.0)
! 	    {
! 	    	errno = ERANGE;
! 	    }			       
  	        /* powf(0.0,negative) */
! 	    //return (float)__kernel_standard((double)x,(double)y,123);
  	    return z;
  	}
! 	if(!(finitef)(z)) {
! 	    if((finitef)(x)&&(finitef)(y)) {
! 	        if((isnanf)(z))
  		    /* powf neg**non-int */
  	            return (float)__kernel_standard((double)x,(double)y,124);
  	        else 
***************
*** 67,75 ****
  	            return (float)__kernel_standard((double)x,(double)y,121);
  	    }
  	} 
! 	if(z < FLT_MIN &&finitef(ux.l)&&finitef(uy.l))
  	    /* powf underflow */
! 	    return (float)__kernel_standard((double)x,(double)y,122);
  	return z;
  #endif
  }
--- 90,99 ----
  	            return (float)__kernel_standard((double)x,(double)y,121);
  	    }
  	} 
! 	if(z < FLT_MIN &&(finitef)(x)&&(finitef)(y))
  	    /* powf underflow */
! 	    if (z == (float)0.0)
! 		return (float)__kernel_standard((double)x,(double)y,122);
  	return z;
  #endif
  }
diff -c oldstuff/wf_remainder.c newstuff/wf_remainder.c
*** oldstuff/wf_remainder.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_remainder.c	Fri Feb 18 14:58:14 2005
***************
*** 16,24 ****
  /* 
   * wrapper remainderf(x,p)
   */
! 
  #include "fdlibm.h"
- #include <libc/ieee.h>
  
  #ifdef __STDC__
  	float remainderf(float x, float y)	/* wrapper remainder */
--- 16,23 ----
  /* 
   * wrapper remainderf(x,p)
   */
! #include <errno.h>
  #include "fdlibm.h"
  
  #ifdef __STDC__
  	float remainderf(float x, float y)	/* wrapper remainder */
***************
*** 30,46 ****
  #ifdef _IEEE_LIBM
  	return __ieee754_remainderf(x,y);
  #else
- 	_float_long_union uy;
  	float z;
- 	
- 	uy.f = y;
- 
  	z = __ieee754_remainderf(x,y);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(uy.l)) return z;
  	if(y==(float)0.0) 
  	    /* remainder(x,0) */
  	    return (float)__kernel_standard((double)x,(double)y,128);
  	else
  	    return z;
  #endif
  }
--- 29,51 ----
  #ifdef _IEEE_LIBM
  	return __ieee754_remainderf(x,y);
  #else
  	float z;
  	z = __ieee754_remainderf(x,y);
! 	if(_LIB_VERSION == _IEEE_) return z;
! 	if ((isnanf)(x) || (isnanf)(y))  return nanf();
! 	if ((isinff)(x) || (y==0.0f))
! 	{
! 	    errno = EDOM;
! 	    return nanf();
! 	}
! 	if ((isinff)(y)) return x;
! # if 0
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(y)) return z;
  	if(y==(float)0.0) 
  	    /* remainder(x,0) */
  	    return (float)__kernel_standard((double)x,(double)y,128);
  	else
+ # endif			
  	    return z;
  #endif
  }
diff -c oldstuff/wf_scalb.c newstuff/wf_scalb.c
*** oldstuff/wf_scalb.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_scalb.c	Sun Feb 20 12:43:02 2005
***************
*** 52,58 ****
  	z = __ieee754_scalbf(x,fn);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if(!(finitef(uz.l)||isnanf(uz.l))&&finitef(ux.l )) {
  	    /* scalbf overflow */
  	    return (float)__kernel_standard((double)x,(double)fn,132);
  	}
--- 52,58 ----
  	z = __ieee754_scalbf(x,fn);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if(!((finitef)(uz.l)||(isnanf)(uz.l))&&(finitef)(ux.l )) {
  	    /* scalbf overflow */
  	    return (float)__kernel_standard((double)x,(double)fn,132);
  	}
***************
*** 61,67 ****
  	    return (float)__kernel_standard((double)x,(double)fn,133);
  	} 
  #ifndef _SCALB_INT
! 	if(!finitef(ufn.l)) errno = ERANGE;
  #endif
  	return z;
  #endif 
--- 61,67 ----
  	    return (float)__kernel_standard((double)x,(double)fn,133);
  	} 
  #ifndef _SCALB_INT
! 	if(!(finitef)(ufn.l)) errno = ERANGE;
  #endif
  	return z;
  #endif 
diff -c oldstuff/wf_sinh.c newstuff/wf_sinh.c
*** oldstuff/wf_sinh.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_sinh.c	Sun Feb 20 13:57:48 2005
***************
*** 39,45 ****
  	z = __ieee754_sinhf(x);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if(!finitef(uz.l)&&finitef(ux.l)) {
  	    /* sinhf overflow */
  	    return (float)__kernel_standard((double)x,(double)x,125);
  	} else
--- 39,45 ----
  	z = __ieee754_sinhf(x);
  	uz.f = z;
  	if(_LIB_VERSION == _IEEE_) return z;
! 	if(!(finitef)(z)&&(finitef)(x)) {
  	    /* sinhf overflow */
  	    return (float)__kernel_standard((double)x,(double)x,125);
  	} else
diff -c oldstuff/wf_sqrt.c newstuff/wf_sqrt.c
*** oldstuff/wf_sqrt.c	Sun Jul 20 06:06:54 2003
--- newstuff/wf_sqrt.c	Sun Feb 20 13:57:48 2005
***************
*** 36,42 ****
  	ux.f = x;
  
  	z = __ieee754_sqrtf(x);
! 	if(_LIB_VERSION == _IEEE_ || isnanf(ux.l)) return z;
  	if(x<(float)0.0) {
  	    /* sqrtf(negative) */
  	    return (float)__kernel_standard((double)x,(double)x,126);
--- 36,42 ----
  	ux.f = x;
  
  	z = __ieee754_sqrtf(x);
! 	if(_LIB_VERSION == _IEEE_ || (isnanf)(x)) return z;
  	if(x<(float)0.0) {
  	    /* sqrtf(negative) */
  	    return (float)__kernel_standard((double)x,(double)x,126);
diff -c oldstuff/wrf_gamma.c newstuff/wrf_gamma.c
*** oldstuff/wrf_gamma.c	Sun Jul 20 06:06:54 2003
--- newstuff/wrf_gamma.c	Sun Feb 20 14:01:30 2005
***************
*** 39,45 ****
          y = __ieee754_gammaf_r(x,signgamp);
  		uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!         if(!finitef(uy.f)&&finitef(ux.f)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* gammaf pole */
                  return (float)__kernel_standard((double)x,(double)x,141);
--- 39,45 ----
          y = __ieee754_gammaf_r(x,signgamp);
  		uy.f = y;
          if(_LIB_VERSION == _IEEE_) return y;
!         if(!(finitef)(y)&&(finitef)(x)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* gammaf pole */
                  return (float)__kernel_standard((double)x,(double)x,141);
diff -c oldstuff/wrf_lgamma.c newstuff/wrf_lgamma.c
*** oldstuff/wrf_lgamma.c	Sun Jul 20 06:06:54 2003
--- newstuff/wrf_lgamma.c	Sun Feb 20 14:03:06 2005
***************
*** 40,46 ****
  	uy.f = y;
  
          if(_LIB_VERSION == _IEEE_) return y;
!     if(!finitef(uy.f)&&finitef(ux.f)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* lgamma pole */
                  return (float)__kernel_standard((double)x,(double)x,115);
--- 40,46 ----
  	uy.f = y;
  
          if(_LIB_VERSION == _IEEE_) return y;
!     if(!(finitef)(y)&&(finitef)(x)) {
              if(floorf(x)==x&&x<=(float)0.0)
  	        /* lgamma pole */
                  return (float)__kernel_standard((double)x,(double)x,115);
