about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_jn.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2012-07-25 12:59:36 +0200
committerMarek Polacek <polacek@redhat.com>2012-07-25 12:59:36 +0200
commit354691b7b55d014b9a4d3a94e2f8f934870b6bff (patch)
treeae16c6123f84e091b5865bf4d8934ceaaad66bc9 /sysdeps/ieee754/dbl-64/e_jn.c
parentbf9e20711e4f3905b2bbcceab2b339b50c7097dd (diff)
downloadglibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.tar.gz
glibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.tar.xz
glibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.zip
Set up errno properly for yn.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_jn.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_jn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c
index 63788c5a24..0d2a24c93b 100644
--- a/sysdeps/ieee754/dbl-64/e_jn.c
+++ b/sysdeps/ieee754/dbl-64/e_jn.c
@@ -36,6 +36,7 @@
  *
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -276,6 +277,9 @@ __ieee754_yn(int n, double x)
 		GET_HIGH_WORD(high,b);
 		a = temp;
 	    }
+	    /* If B is +-Inf, set up errno accordingly.  */
+	    if (! __finite (b))
+	      __set_errno (ERANGE);
 	}
 	if(sign>0) return b; else return -b;
 }