You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
/* __ieee754_acosl(x)
* Method :
* if x is NaN, return x itself;
* if |x|>1, return NaN with invalid signal.
*
- * Functions needed: __ieee754_sqrtl.
+ * Functions needed: sqrtl.
*/
#include <math.h>
{
long double a, z, r, w, p, q, s, t, f2;
+ if (__glibc_unlikely (isnan (x)))
+ return x + x;
a = __builtin_fabsl (x);
if (a == 1.0L)
{
}
if (a < 0.5L)
{
- if (a < 6.938893903907228e-18L) /* |x| < 2**-57 */
+ if (a < 0x1p-106L)
return pio2_hi + pio2_lo;
if (a < 0.4375L)
{
double shi, slo;
z = (one - a) * 0.5;
- s = __ieee754_sqrtl (z);
+ s = sqrtl (z);
/* Compute an extended precision square root from
the Newton iteration s -> 0.5 * (s + z / s).
The change w from s to the improved value is