summaryrefslogtreecommitdiff
path: root/math/e_scalbf.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
commit4dd9e35bfd35d3138bc44169baba098005bad51e (patch)
treea4939c43a9c3fe00eb27f023e14acc5e1fe8808c /math/e_scalbf.c
parentbd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff)
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'math/e_scalbf.c')
-rw-r--r--math/e_scalbf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/math/e_scalbf.c b/math/e_scalbf.c
index 68e6c5fcce..08e1979a2a 100644
--- a/math/e_scalbf.c
+++ b/math/e_scalbf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
@@ -40,17 +40,17 @@ invalid_fn (float x, float fn)
float
__ieee754_scalbf (float x, float fn)
{
- if (__builtin_expect (__isnanf (x), 0))
+ if (__glibc_unlikely (isnan (x)))
return x * fn;
- if (__builtin_expect (!__finitef (fn), 0))
+ if (__glibc_unlikely (!isfinite (fn)))
{
- if (__isnanf (fn) || fn > 0.0f)
+ if (isnan (fn) || fn > 0.0f)
return x * fn;
if (x == 0.0f)
return x;
return x / -fn;
}
- if (__builtin_expect ((float) (int) fn != fn, 0))
+ if (__glibc_unlikely (fabsf (fn) >= 0x1p31f || (float) (int) fn != fn))
return invalid_fn (x, fn);
return __scalbnf (x, (int) fn);