diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-12 11:27:51 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-12 11:27:51 -0400 |
commit | 0ac5ae2335292908f39031b1ea9fe8edce433c0f (patch) | |
tree | f9d26c8abc0de39d18d4c13e70f6022cdc6b461f /math/w_sinh.c | |
parent | a843a204a3e8a0dd53584dad3668771abaec84ac (diff) | |
download | glibc-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 'math/w_sinh.c')
-rw-r--r-- | math/w_sinh.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/math/w_sinh.c b/math/w_sinh.c index c95e154fc3..34ad2d8624 100644 --- a/math/w_sinh.c +++ b/math/w_sinh.c @@ -10,10 +10,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; -#endif - /* * wrapper sinh(x) */ @@ -21,24 +17,15 @@ static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $"; #include <math.h> #include <math_private.h> -#ifdef __STDC__ - double __sinh(double x) /* wrapper sinh */ -#else - double __sinh(x) /* wrapper sinh */ - double x; -#endif +double +__sinh (double x) { -#ifdef _IEEE_LIBM - return __ieee754_sinh(x); -#else - double z; - z = __ieee754_sinh(x); - if(_LIB_VERSION == _IEEE_) return z; - if(!__finite(z)&&__finite(x)) { - return __kernel_standard(x,x,25); /* sinh overflow */ - } else - return z; -#endif + double z = __ieee754_sinh (x); + if (__builtin_expect (!__finite (z), 0) && __finite (x) + && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 25); /* sinh overflow */ + + return z; } weak_alias (__sinh, sinh) #ifdef NO_LONG_DOUBLE |