summaryrefslogtreecommitdiff
path: root/math/s_ctan.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-22 00:32:39 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-22 00:32:39 -0400
commitbc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01 (patch)
treebbb67e94ed1a9ba0becbe752c6853c199c639070 /math/s_ctan.c
parentc196fed8f01a8599dd43edf1c7a1ea3ba9ed0598 (diff)
downloadglibc-bc62c2fb152d6ffec63975d88fd8f1bc3d3b7c01.tar.gz
Optimization to some complex math functions
Also, change last reference to __sqrt into __sqrt to easily.
Diffstat (limited to 'math/s_ctan.c')
-rw-r--r--math/s_ctan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/math/s_ctan.c b/math/s_ctan.c
index 0dd211e907..41958516f1 100644
--- a/math/s_ctan.c
+++ b/math/s_ctan.c
@@ -30,7 +30,7 @@ __ctan (__complex__ double x)
{
__complex__ double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
if (__isinf_ns (__imag__ x))
{
@@ -46,10 +46,8 @@ __ctan (__complex__ double x)
__real__ res = __nan ("");
__imag__ res = __nan ("");
-#ifdef FE_INVALID
if (__isinf_ns (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else