Back to index

glibc  2.9
s_significand.c
Go to the documentation of this file.
00001 /* @(#)s_signif.c 5.1 93/09/24 */
00002 /*
00003  * ====================================================
00004  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00005  *
00006  * Developed at SunPro, a Sun Microsystems, Inc. business.
00007  * Permission to use, copy, modify, and distribute this
00008  * software is freely granted, provided that this notice
00009  * is preserved.
00010  * ====================================================
00011  */
00012 
00013 #if defined(LIBM_SCCS) && !defined(lint)
00014 static char rcsid[] = "$NetBSD: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Exp $";
00015 #endif
00016 
00017 /*
00018  * significand(x) computes just
00019  *     scalb(x, (double) -ilogb(x)),
00020  * for exercising the fraction-part(F) IEEE 754-1985 test vector.
00021  */
00022 
00023 #include <math.h>
00024 #include "math_private.h"
00025 
00026 #ifdef __STDC__
00027        double __significand(double x)
00028 #else
00029        double __significand(x)
00030        double x;
00031 #endif
00032 {
00033        return __ieee754_scalb(x,(double) -__ilogb(x));
00034 }
00035 weak_alias (__significand, significand)
00036 #ifdef NO_LONG_DOUBLE
00037 strong_alias (__significand, __significandl)
00038 weak_alias (__significand, significandl)
00039 #endif