diff options
author | Marek Polacek <polacek@redhat.com> | 2012-07-25 12:59:36 +0200 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2012-07-25 12:59:36 +0200 |
commit | 354691b7b55d014b9a4d3a94e2f8f934870b6bff (patch) | |
tree | ae16c6123f84e091b5865bf4d8934ceaaad66bc9 /sysdeps/ieee754/flt-32 | |
parent | bf9e20711e4f3905b2bbcceab2b339b50c7097dd (diff) | |
download | glibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.zip glibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.tar.gz glibc-354691b7b55d014b9a4d3a94e2f8f934870b6bff.tar.bz2 |
Set up errno properly for yn.
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_jnf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c index bed9cee..ad26d7e 100644 --- a/sysdeps/ieee754/flt-32/e_jnf.c +++ b/sysdeps/ieee754/flt-32/e_jnf.c @@ -13,6 +13,7 @@ * ==================================================== */ +#include <errno.h> #include <math.h> #include <math_private.h> @@ -199,6 +200,9 @@ __ieee754_ynf(int n, float x) GET_FLOAT_WORD(ib,b); a = temp; } + /* If B is +-Inf, set up errno accordingly. */ + if (! __finitef (b)) + __set_errno (ERANGE); if(sign>0) return b; else return -b; } strong_alias (__ieee754_ynf, __ynf_finite) |