Back to index

glibc  2.9
s_fabsl.c
Go to the documentation of this file.
00001 /* s_fabsl.c -- long double version of s_fabs.c.
00002  * Conversion to long double by Ulrich Drepper,
00003  * Cygnus Support, drepper@cygnus.com.
00004  */
00005 
00006 /*
00007  * ====================================================
00008  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00009  *
00010  * Developed at SunPro, a Sun Microsystems, Inc. business.
00011  * Permission to use, copy, modify, and distribute this
00012  * software is freely granted, provided that this notice
00013  * is preserved.
00014  * ====================================================
00015  */
00016 
00017 #if defined(LIBM_SCCS) && !defined(lint)
00018 static char rcsid[] = "$NetBSD: $";
00019 #endif
00020 
00021 /*
00022  * fabsl(x) returns the absolute value of x.
00023  */
00024 
00025 #include "math.h"
00026 #include "math_private.h"
00027 
00028 #ifdef __STDC__
00029        long double __fabsl(long double x)
00030 #else
00031        long double __fabsl(x)
00032        long double x;
00033 #endif
00034 {
00035        u_int32_t exp;
00036        GET_LDOUBLE_EXP(exp,x);
00037        SET_LDOUBLE_EXP(x,exp&0x7fff);
00038         return x;
00039 }
00040 weak_alias (__fabsl, fabsl)