+2007-01-12 Steven Munroe <sjmunroe@us.ibm.com>
+ Joe Kerian <jkerian@us.us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Include
+ <math_ldbl_opt.h>. Remove weak_alias. Use long_double_symbol macro.
+ (__copysignl): Use signbit() for comparison.
+ * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c (__fabsl): Correct parms for
+ SET_LDOUBLE_WORDS64.
+
+ [BZ #2423, #2749]
+ * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Don't include <fenv_libc.h>.
+ (__ceill): Remove calls to fegetround(), fesetround().
+ * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
+
2007-01-17 Jakub Jelinek <jakub@redhat.com>
* nscd/nscd_getserv_r.c (nscd_getserv_r): Fix pastos.
/* Ceil (round to +inf) long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
02111-1307 USA. */
#include <math.h>
-#include <fenv_libc.h>
#include <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
__builtin_inf ()), 1))
{
double orig_xh;
- int save_round = fegetround ();
/* Long double arithmetic, including the canonicalisation below,
only works in round-to-nearest mode. */
- fesetround (FE_TONEAREST);
/* Convert the high double to integer. */
orig_xh = xh;
/* Ensure we return -0 rather than +0 when appropriate. */
if (orig_xh < 0.0)
xh = -__builtin_fabs (xh);
-
- fesetround (save_round);
}
return ldbl_pack (xh, xl);
#include "math.h"
#include "math_private.h"
+#include <math_ldbl_opt.h>
#ifdef __STDC__
long double __copysignl(long double x, long double y)
long double x,y;
#endif
{
- if (y < 0.0)
- {
- if (x >= 0.0)
- x = -x;
- }
- else if (x < 0.0)
+ if (signbit (x) != signbit (y))
x = -x;
return x;
}
-weak_alias (__copysignl, copysignl)
+
+#ifdef IS_IN_libm
+long_double_symbol (libm, __copysignl, copysignl);
+#else
+long_double_symbol (libc, __copysignl, copysignl);
+#endif
GET_LDOUBLE_WORDS64(hx,lx,x);
lx = lx ^ ( hx & 0x8000000000000000LL );
hx = hx & 0x7fffffffffffffffLL;
- SET_LDOUBLE_WORDS64(hx,lx,x);
- return x;
+ SET_LDOUBLE_WORDS64(x,hx,lx);
+ return x;
}
long_double_symbol (libm, __fabsl, fabsl);
/* Round to int long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
02111-1307 USA. */
#include <math.h>
-#include <fenv_libc.h>
#include <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
&& __builtin_isless (__builtin_fabs (xh),
__builtin_inf ()), 1))
{
- int save_round = fegetround ();
-
/* Long double arithmetic, including the canonicalisation below,
only works in round-to-nearest mode. */
- fesetround (FE_TONEAREST);
/* Convert the high double to integer. */
hi = ldbl_nearbyint (xh);
xh = hi;
xl = lo;
ldbl_canonicalize (&xh, &xl);
-
- fesetround (save_round);
}
return ldbl_pack (xh, xl);
/* Round to int long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
when it's coded in C. */
#include <math.h>
-#include <fenv_libc.h>
#include <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
__builtin_inf ()), 1))
{
double orig_xh;
- int save_round = fegetround ();
/* Long double arithmetic, including the canonicalisation below,
only works in round-to-nearest mode. */
- fesetround (FE_TONEAREST);
/* Convert the high double to integer. */
orig_xh = xh;
xh = hi;
xl = lo;
ldbl_canonicalize (&xh, &xl);
-
- fesetround (save_round);
}
return ldbl_pack (xh, xl);
/* Truncate (toward zero) long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
when it's coded in C. */
#include <math.h>
-#include <fenv_libc.h>
#include <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
__builtin_inf ()), 1))
{
double orig_xh;
- int save_round = fegetround ();
/* Long double arithmetic, including the canonicalisation below,
only works in round-to-nearest mode. */
- fesetround (FE_TONEAREST);
/* Convert the high double to integer. */
orig_xh = xh;
/* Ensure we return -0 rather than +0 when appropriate. */
if (orig_xh < 0.0)
xh = -__builtin_fabs (xh);
-
- fesetround (save_round);
}
return ldbl_pack (xh, xl);