From bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Oct 2011 00:32:39 -0400 Subject: Optimization to some complex math functions Also, change last reference to __sqrt into __sqrt to easily. --- math/s_csinf.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'math/s_csinf.c') diff --git a/math/s_csinf.c b/math/s_csinf.c index 61786ba..4f4dfb8 100644 --- a/math/s_csinf.c +++ b/math/s_csinf.c @@ -1,5 +1,5 @@ /* Complex sine function for float. - 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 , 1997. @@ -35,10 +35,10 @@ __csinf (__complex__ float x) __real__ x = fabsf (__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. */ float sinh_val = __ieee754_sinhf (__imag__ x); @@ -61,19 +61,15 @@ __csinf (__complex__ float x) __real__ retval = __nanf (""); __imag__ retval = __imag__ x; -#ifdef FE_INVALID if (rcls == FP_INFINITE) feraiseexcept (FE_INVALID); -#endif } else { __real__ retval = __nanf (""); __imag__ retval = __nanf (""); -#ifdef FE_INVALID feraiseexcept (FE_INVALID); -#endif } } } @@ -107,10 +103,8 @@ __csinf (__complex__ float x) __real__ retval = __nanf (""); __imag__ retval = HUGE_VALF; -#ifdef FE_INVALID if (rcls == FP_INFINITE) feraiseexcept (FE_INVALID); -#endif } } else -- cgit v1.1