about summary refs log tree commit diff
path: root/math/w_jnf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/w_jnf.c')
-rw-r--r--math/w_jnf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/math/w_jnf.c b/math/w_jnf.c
index c9114e7b09..cb1aab8e73 100644
--- a/math/w_jnf.c
+++ b/math/w_jnf.c
@@ -49,8 +49,11 @@ ynf (int n, float x)
 	  return __kernel_standard_f (n, x, 113);
 	}
       else if (x == 0.0)
-	/* d = -one/(x-x) */
-	return __kernel_standard_f (n, x, 112);
+	{
+	  /* d = -one/(x-x) */
+	  feraiseexcept (FE_DIVBYZERO);
+	  return __kernel_standard_f (n, x, 112);
+	}
       else if (_LIB_VERSION != _POSIX_)
 	/* yn(n,x>X_TLOSS) */
 	return __kernel_standard_f (n, x, 139);