Prefer https to http for gnu.org and fsf.org URLs
[platform/upstream/glibc.git] / sysdeps / ieee754 / flt-32 / e_atanhf.c
index 84e080d..878e153 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
 
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 
 /* __ieee754_atanh(x)
 
  */
 
+#include <float.h>
 #include <inttypes.h>
 #include <math.h>
+#include <math-barriers.h>
 #include <math_private.h>
+#include <math-underflow.h>
 
 static const float huge = 1e30;
 
@@ -48,16 +51,17 @@ __ieee754_atanhf (float x)
   float t;
   if (isless (xa, 0.5f))
     {
-      if (__builtin_expect (xa < 0x1.0p-28f, 0))
+      if (__glibc_unlikely (xa < 0x1.0p-28f))
        {
          math_force_eval (huge + x);
+         math_check_force_underflow (x);
          return x;
        }
 
       t = xa + xa;
       t = 0.5f * __log1pf (t + t * xa / (1.0f - xa));
     }
-  else if (__builtin_expect (isless (xa, 1.0f), 1))
+  else if (__glibc_likely (isless (xa, 1.0f)))
     t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa));
   else
     {
@@ -67,6 +71,6 @@ __ieee754_atanhf (float x)
       return x / 0.0f;
     }
 
-  return __copysignf (t, x);
+  return copysignf (t, x);
 }
 strong_alias (__ieee754_atanhf, __atanhf_finite)