diff options
Diffstat (limited to 'libquadmath/math/sincosq.c')
-rw-r--r-- | libquadmath/math/sincosq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libquadmath/math/sincosq.c b/libquadmath/math/sincosq.c index b7c221486d7..d83b1a6b757 100644 --- a/libquadmath/math/sincosq.c +++ b/libquadmath/math/sincosq.c @@ -1,5 +1,5 @@ /* Compute sine and cosine of argument. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and Jakub Jelinek <jj@ultra.linux.cz>. @@ -19,6 +19,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include "quadmath-imp.h" void @@ -37,6 +38,8 @@ sincosq (__float128 x, __float128 *sinx, __float128 *cosx) { /* sin(Inf or NaN) is NaN */ *sinx = *cosx = x - x; + if (isinfq (x)) + errno = EDOM; } else { |