summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/e_remainderl.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-12 11:27:51 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-12 11:27:51 -0400
commit0ac5ae2335292908f39031b1ea9fe8edce433c0f (patch)
treef9d26c8abc0de39d18d4c13e70f6022cdc6b461f /sysdeps/ieee754/ldbl-128/e_remainderl.c
parenta843a204a3e8a0dd53584dad3668771abaec84ac (diff)
downloadglibc-0ac5ae2335292908f39031b1ea9fe8edce433c0f.tar.gz
Optimize libm
libm is now somewhat integrated with gcc's -ffinite-math-only option and lots of the wrapper functions have been optimized.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_remainderl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_remainderl.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_remainderl.c b/sysdeps/ieee754/ldbl-128/e_remainderl.c
index 81af247b33..84233808ef 100644
--- a/sysdeps/ieee754/ldbl-128/e_remainderl.c
+++ b/sysdeps/ieee754/ldbl-128/e_remainderl.c
@@ -7,36 +7,28 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* __ieee754_remainderl(x,p)
- * Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
+ * Return :
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
* integer nearest x/p (in half way case choose the even one).
- * Method :
+ * Method :
* Based on fmodl() return x-[x/p]chopped*p exactlp.
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
- long double __ieee754_remainderl(long double x, long double p)
-#else
- long double __ieee754_remainderl(x,p)
- long double x,p;
-#endif
+long double
+__ieee754_remainderl(long double x, long double p)
{
int64_t hx,hp;
u_int64_t sx,lx,lp;
@@ -49,7 +41,7 @@ static long double zero = 0.0L;
hx &= 0x7fffffffffffffffLL;
/* purge off exception values */
- if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
+ if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
if((hx>=0x7fff000000000000LL)|| /* x not finite */
((hp>=0x7fff000000000000LL)&& /* p is NaN */
(((hp-0x7fff000000000000LL)|lp)!=0)))
@@ -76,3 +68,4 @@ static long double zero = 0.0L;
SET_LDOUBLE_MSW64(x,hx^sx);
return x;
}
+strong_alias (__ieee754_remainderl, __remainderl_finite)