summaryrefslogtreecommitdiff
path: root/libc/math/s_csin.c
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-10-25 00:37:10 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-10-25 00:37:10 +0000
commit4bbe4e2185c5484328182720ff7b3bb4f9593bff (patch)
treecd67e40a74928c0f58d4f5b79d2e260e4099fee7 /libc/math/s_csin.c
parent91b4be71461f78cabe1fb5f164cea71b60e9e98a (diff)
downloadeglibc2-4bbe4e2185c5484328182720ff7b3bb4f9593bff.tar.gz
Merge changes between r15223 and r15532 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@15545 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/math/s_csin.c')
-rw-r--r--libc/math/s_csin.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libc/math/s_csin.c b/libc/math/s_csin.c
index eb380e2c3..07a78c438 100644
--- a/libc/math/s_csin.c
+++ b/libc/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.
@@ -22,7 +22,7 @@
#include <fenv.h>
#include <math.h>
-#include "math_private.h"
+#include <math_private.h>
__complex__ double
@@ -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