diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-22 00:32:39 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-22 00:32:39 -0400 |
commit | bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01 (patch) | |
tree | bbb67e94ed1a9ba0becbe752c6853c199c639070 /math/s_csin.c | |
parent | c196fed8f01a8599dd43edf1c7a1ea3ba9ed0598 (diff) | |
download | glibc-bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01.zip glibc-bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01.tar.gz glibc-bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01.tar.bz2 |
Optimization to some complex math functions
Also, change last reference to __sqrt into __sqrt to easily.
Diffstat (limited to 'math/s_csin.c')
-rw-r--r-- | math/s_csin.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/math/s_csin.c b/math/s_csin.c index 0d4441c..07a78c4 100644 --- a/math/s_csin.c +++ b/math/s_csin.c @@ -1,5 +1,5 @@ /* Complex sine function for double. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -35,10 +35,10 @@ __csin (__complex__ double x) __real__ x = fabs (__real__ x); - if (icls >= FP_ZERO) + if (__builtin_expect (icls >= FP_ZERO, 1)) { /* Imaginary part is finite. */ - if (rcls >= FP_ZERO) + if (__builtin_expect (rcls >= FP_ZERO, 1)) { /* Real part is finite. */ double sinh_val = __ieee754_sinh (__imag__ x); @@ -61,19 +61,15 @@ __csin (__complex__ double x) __real__ retval = __nan (""); __imag__ retval = __imag__ x; -#ifdef FE_INVALID if (rcls == FP_INFINITE) feraiseexcept (FE_INVALID); -#endif } else { __real__ retval = __nan (""); __imag__ retval = __nan (""); -#ifdef FE_INVALID feraiseexcept (FE_INVALID); -#endif } } } @@ -107,10 +103,8 @@ __csin (__complex__ double x) __real__ retval = __nan (""); __imag__ retval = HUGE_VAL; -#ifdef FE_INVALID if (rcls == FP_INFINITE) feraiseexcept (FE_INVALID); -#endif } } else |