summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
index 96845fe5f8..28b208883d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2018 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -91,11 +91,9 @@ long double __ieee754_sqrtl(long double x)
return c.x * i;
}
else {
- if (k>=INT64_C(0x7ff0000000000000)) {
- if (a.i[0] == INT64_C(0xfff0000000000000))
- return (big1-big1)/(big-big); /* sqrt (-Inf) = NaN. */
- return x; /* sqrt (NaN) = NaN, sqrt (+Inf) = +Inf. */
- }
+ if (k>=INT64_C(0x7ff0000000000000))
+ /* sqrt (-Inf) = NaN, sqrt (NaN) = NaN, sqrt (+Inf) = +Inf. */
+ return x * x + x;
if (x == 0) return x;
if (x < 0) return (big1-big1)/(big-big);
return tm256*__ieee754_sqrtl(x*t512);