home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / hobby / palmoon / palmoon.EXE / s_significand.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-16  |  1.1 KB  |  42 lines

  1. // 15 August 1997, Rick Huebner:  Small changes made to adapt for MathLib
  2.  
  3. /* @(#)s_signif.c 5.1 93/09/24 */
  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: s_significand.c,v 1.6 1995/05/10 20:48:11 jtc Exp $";
  17. #endif
  18.  
  19. /*
  20.  * significand(x) computes just
  21.  *     scalb(x, (double) -ilogb(x)),
  22.  * for exercising the fraction-part(F) IEEE 754-1985 test vector.
  23.  */
  24.  
  25. #include "math.h"
  26. #include "math_private.h"
  27.  
  28. #ifdef __STDC__
  29.     double __significand(double x)
  30. #else
  31.     double __significand(x)
  32.     double x;
  33. #endif
  34. {
  35.     return __ieee754_scalb(x,(double) -__ilogb(x));
  36. }
  37. weak_alias (__significand, significand)
  38. #ifdef NO_LONG_DOUBLE
  39. strong_alias (__significand, __significandl)
  40. weak_alias (__significand, significandl)
  41. #endif
  42.