diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | math/e_scalb.c | 6 | ||||
-rw-r--r-- | math/e_scalbf.c | 6 | ||||
-rw-r--r-- | math/e_scalbl.c | 6 |
4 files changed, 15 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog index e2e53175ea..1e63a386fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2016-08-04 Joseph Myers <joseph@codesourcery.com> + + * math/e_scalb.c: Do not include <fenv.h>. + (invalid_fn): Do calculation resulting in NaN instead of raising + FE_INVALID and returning a NaN explicitly. + * math/e_scalbf.c: Do not include <fenv.h>. + (invalid_fn): Do calculation resulting in NaN instead of raising + FE_INVALID and returning a NaN explicitly. + * math/e_scalbl.c: Do not include <fenv.h>. + (invalid_fn): Do calculation resulting in NaN instead of raising + FE_INVALID and returning a NaN explicitly. + 2016-08-04 Carlos O'Donell <carlos@redhat.com> * po/de.po: Updated from Translation Project. diff --git a/math/e_scalb.c b/math/e_scalb.c index 7f61ce0455..692f105d7f 100644 --- a/math/e_scalb.c +++ b/math/e_scalb.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <fenv.h> #include <math.h> #include <math_private.h> @@ -26,10 +25,7 @@ __attribute__ ((noinline)) invalid_fn (double x, double fn) { if (__rint (fn) != fn) - { - __feraiseexcept (FE_INVALID); - return __nan (""); - } + return (fn - fn) / (fn - fn); else if (fn > 65000.0) return __scalbn (x, 65000); else diff --git a/math/e_scalbf.c b/math/e_scalbf.c index 7377f6e1e8..8df86f4bb8 100644 --- a/math/e_scalbf.c +++ b/math/e_scalbf.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <fenv.h> #include <math.h> #include <math_private.h> @@ -26,10 +25,7 @@ __attribute__ ((noinline)) invalid_fn (float x, float fn) { if (__rintf (fn) != fn) - { - feraiseexcept (FE_INVALID); - return __nan (""); - } + return (fn - fn) / (fn - fn); else if (fn > 65000.0f) return __scalbnf (x, 65000); else diff --git a/math/e_scalbl.c b/math/e_scalbl.c index 53e9ca22f1..02956ac9e6 100644 --- a/math/e_scalbl.c +++ b/math/e_scalbl.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <fenv.h> #include <math.h> #include <math_private.h> @@ -26,10 +25,7 @@ __attribute__ ((noinline)) invalid_fn (long double x, long double fn) { if (__rintl (fn) != fn) - { - feraiseexcept (FE_INVALID); - return __nan (""); - } + return (fn - fn) / (fn - fn); else if (fn > 65000.0L) return __scalbnl (x, 65000); else |