summaryrefslogtreecommitdiff
path: root/libc/math/w_jnf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/math/w_jnf.c')
-rw-r--r--libc/math/w_jnf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/math/w_jnf.c b/libc/math/w_jnf.c
index c9114e7b0..1ad8163bf 100644
--- a/libc/math/w_jnf.c
+++ b/libc/math/w_jnf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
@@ -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);