From 7edb55ce06ab1fa716a062cd1cb6682585bb449d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Oct 2011 10:18:26 -0400 Subject: Optimize use of isnan, isinf, finite --- math/s_ccos.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'math/s_ccos.c') diff --git a/math/s_ccos.c b/math/s_ccos.c index 1b244d7079..63851aab54 100644 --- a/math/s_ccos.c +++ b/math/s_ccos.c @@ -1,5 +1,5 @@ /* Return cosine of complex double value. - 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. @@ -21,6 +21,7 @@ #include #include #include +#include __complex__ double @@ -36,17 +37,17 @@ __ccos (__complex__ double x) __imag__ res = 0.0; #ifdef FE_INVALID - if (__isinf (__real__ x)) + if (__isinf_ns (__real__ x)) feraiseexcept (FE_INVALID); #endif } - else if (__isinf (__imag__ x)) + else if (__isinf_ns (__imag__ x)) { __real__ res = HUGE_VAL; __imag__ res = __nan (""); #ifdef FE_INVALID - if (__isinf (__real__ x)) + if (__isinf_ns (__real__ x)) feraiseexcept (FE_INVALID); #endif } -- cgit 1.4.1