* math/math_private.h: Declare __copysignf.
	* sysdeps/ieee754/flt-32/s_scalbnf.c: Use __copysignf instead of
	copysignf.
This commit is contained in:
Ulrich Drepper 2003-08-28 00:14:28 +00:00
parent ea493b56b4
commit abcb00dabb
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2003-08-27 Ulrich Drepper <drepper@redhat.com> 2003-08-27 Ulrich Drepper <drepper@redhat.com>
* math/math_private.h: Declare __copysignf.
* sysdeps/ieee754/flt-32/s_scalbnf.c: Use __copysignf instead of
copysignf.
* sysdeps/x86_64/fpu/bits/mathinline.h: Define __signbitf, * sysdeps/x86_64/fpu/bits/mathinline.h: Define __signbitf,
__signbit, and __signbitl inline functions. __signbit, and __signbitl inline functions.

View File

@ -232,6 +232,9 @@ extern float __kernel_cosf (float,float);
extern float __kernel_tanf (float,float,int); extern float __kernel_tanf (float,float,int);
extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*); extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
/* internal functions. */
extern float __copysignf (float x, float __y);
/* ieee style elementary long double functions */ /* ieee style elementary long double functions */
extern long double __ieee754_sqrtl (long double); extern long double __ieee754_sqrtl (long double);

View File

@ -49,13 +49,13 @@ tiny = 1.0e-30;
if (k==0xff) return x+x; /* NaN or Inf */ if (k==0xff) return x+x; /* NaN or Inf */
k = k+n; k = k+n;
if (n> 50000 || k > 0xfe) if (n> 50000 || k > 0xfe)
return huge*copysignf(huge,x); /* overflow */ return huge*__copysignf(huge,x); /* overflow */
if (n< -50000) if (n< -50000)
return tiny*copysignf(tiny,x); /*underflow*/ return tiny*__copysignf(tiny,x); /*underflow*/
if (k > 0) /* normal result */ if (k > 0) /* normal result */
{SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;}
if (k <= -25) if (k <= -25)
return tiny*copysignf(tiny,x); /*underflow*/ return tiny*__copysignf(tiny,x); /*underflow*/
k += 25; /* subnormal result */ k += 25; /* subnormal result */
SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23));
return x*twom25; return x*twom25;