WIP: add an initial skeleton for a real scsi.device based upon the ata device impleme...
[AROS.git] / compiler / stdc / math / s_fabs.c
blobd3dbb9226f50dbe8e9dcaef2a1bddffa999e3c71
1 /* @(#)s_fabs.c 5.1 93/09/24 */
2 /*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
13 #ifndef lint
14 static char rcsid[] = "$FreeBSD: src/lib/msun/src/s_fabs.c,v 1.7 2002/05/28 18:15:04 alfred Exp $";
15 #endif
18 * fabs(x) returns the absolute value of x.
21 #include <float.h>
22 #include "math.h"
23 #include "math_private.h"
25 double
26 fabs(double x)
28 uint32_t high;
29 GET_HIGH_WORD(high,x);
30 SET_HIGH_WORD(x,high&0x7fffffff);
31 return x;
34 #if (LDBL_MANT_DIG == DBL_MANT_DIG)
35 AROS_MAKE_ASM_SYM(typeof(fabsl), fabsl, AROS_CSYM_FROM_ASM_NAME(fabsl), AROS_CSYM_FROM_ASM_NAME(fabs));
36 AROS_EXPORT_ASM_SYM(AROS_CSYM_FROM_ASM_NAME(fabsl));
37 #endif