00001 #if !defined(__ppc__)
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #if defined(LIBM_SCCS) && !defined(lint)
00015 static char rcsid[] = "$NetBSD: s_ldexp.c,v 1.6 1995/05/10 20:47:40 jtc Exp $";
00016 #endif
00017
00018 #include "math.h"
00019 #include "mathP.h"
00020 #include <linux/errno.h>
00021
00022 extern int libm_errno;
00023
00024 #ifdef __STDC__
00025 double ldexp(double value, int exp)
00026 #else
00027 double ldexp(value, exp)
00028 double value; int exp;
00029 #endif
00030 {
00031 if(!finite(value)||value==0.0) return value;
00032 value = scalbn(value,exp);
00033 if(!finite(value)||value==0.0) libm_errno = ERANGE;
00034 return value;
00035 }
00036 #endif