home *** CD-ROM | disk | FTP | other *** search
/ Game Zone - 1,000+ Games / GAMEZONE.BIN / Programs / PALM / Oh-One / src / s_ldexp.c < prev    next >
C/C++ Source or Header  |  1997-08-16  |  1KB  |  40 lines

  1. // 15 August 1997, Rick Huebner:  Small changes made to adapt for MathLib
  2.  
  3. /* @(#)s_ldexp.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_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
  17. #endif
  18.  
  19. #include "math.h"
  20. #include "math_private.h"
  21. //#include <errno.h>
  22.  
  23. #ifdef __STDC__
  24.     double __ldexp(double value, int exp)
  25. #else
  26.     double __ldexp(value, exp)
  27.     double value; int exp;
  28. #endif
  29. {
  30.     if(!__finite(value)||value==0.0) return value;
  31.     value = __scalbn(value,exp);
  32. //    if(!__finite(value)||value==0.0) __set_errno (ERANGE);
  33.     return value;
  34. }
  35. weak_alias (__ldexp, ldexp)
  36. #ifdef NO_LONG_DOUBLE
  37. strong_alias (__ldexp, __ldexpl)
  38. weak_alias (__ldexp, ldexpl)
  39. #endif
  40.