]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/msun/src/s_fabs.c
zfs: merge openzfs/zfs@a0b2a93c4
[FreeBSD/FreeBSD.git] / lib / msun / src / s_fabs.c
1 /*
2  * ====================================================
3  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4  *
5  * Developed at SunPro, a Sun Microsystems, Inc. business.
6  * Permission to use, copy, modify, and distribute this
7  * software is freely granted, provided that this notice
8  * is preserved.
9  * ====================================================
10  */
11
12 #include <sys/cdefs.h>
13 /*
14  * fabs(x) returns the absolute value of x.
15  */
16
17 #include "math.h"
18 #include "math_private.h"
19
20 double
21 fabs(double x)
22 {
23         u_int32_t high;
24         GET_HIGH_WORD(high,x);
25         SET_HIGH_WORD(x,high&0x7fffffff);
26         return x;
27 }