mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Optimization to some complex math functions
Also, change last reference to __sqrt into __sqrt to easily.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Complex sine function for long 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 @@ __csinl (__complex__ long double x)
|
||||
|
||||
__real__ x = fabsl (__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. */
|
||||
long double sinh_val = __ieee754_sinhl (__imag__ x);
|
||||
@ -61,19 +61,15 @@ __csinl (__complex__ long double x)
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __imag__ x;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = __nanl ("");
|
||||
|
||||
#ifdef FE_INVALID
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -107,10 +103,8 @@ __csinl (__complex__ long double x)
|
||||
__real__ retval = __nanl ("");
|
||||
__imag__ retval = HUGE_VALL;
|
||||
|
||||
#ifdef FE_INVALID
|
||||
if (rcls == FP_INFINITE)
|
||||
feraiseexcept (FE_INVALID);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user