about summary refs log tree commit diff
path: root/math/w_j1.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-12-04 14:39:37 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-12-04 14:39:37 +0000
commit699ff83712b5796ac50ed332d9dad55d38450e81 (patch)
tree8e2470bbcf5d1d18813aa9d063771b083c8667af /math/w_j1.c
parent5b118558f9fb0620508d51c34c2cb5ba4f1f01c2 (diff)
downloadglibc-699ff83712b5796ac50ed332d9dad55d38450e81.tar.gz
glibc-699ff83712b5796ac50ed332d9dad55d38450e81.tar.xz
glibc-699ff83712b5796ac50ed332d9dad55d38450e81.zip
Fix Bessel function error handling (bug 6807, bug 15901).
Diffstat (limited to 'math/w_j1.c')
-rw-r--r--math/w_j1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/math/w_j1.c b/math/w_j1.c
index 743c940b14..a9fb7aebbe 100644
--- a/math/w_j1.c
+++ b/math/w_j1.c
@@ -51,8 +51,11 @@ y1 (double x)
 	  return __kernel_standard (x, x, 11);
 	}
       else if (x == 0.0)
-	/* d = -one/(x-x) */
-	return __kernel_standard (x, x, 10);
+	{
+	  /* d = -one/(x-x) */
+	  feraiseexcept (FE_DIVBYZERO);
+	  return __kernel_standard (x, x, 10);
+	}
       else if (_LIB_VERSION != _POSIX_)
 	/* y1(x>X_TLOSS) */
 	return __kernel_standard (x, x, 37);