1 /* s_fabsl.c -- long double version of s_fabs.c.
2 */
3
4 /*
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7 *
8 * Developed at SunPro, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15 #if defined(LIBM_SCCS) && !defined(lint)
16 static char rcsid[] = "$NetBSD: $";
17 #endif
18
19 /*
20 * fabsl(x) returns the absolute value of x.
21 */
22
23 #include <math.h>
24 #include <math_private.h>
25 #include <libm-alias-ldouble.h>
26
__fabsl(_Float128 x)27 _Float128 __fabsl(_Float128 x)
28 {
29 uint64_t hx;
30 GET_LDOUBLE_MSW64(hx,x);
31 SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL);
32 return x;
33 }
34 libm_alias_ldouble (__fabs, fabs)
35