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_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $";
00016 #endif
00017
00018
00019
00020
00021
00022
00023
00024 #include "math.h"
00025 #include "mathP.h"
00026
00027 #ifdef __STDC__
00028 double copysign(double x, double y)
00029 #else
00030 double copysign(x,y)
00031 double x,y;
00032 #endif
00033 {
00034 u_int32_t hx,hy;
00035 GET_HIGH_WORD(hx,x);
00036 GET_HIGH_WORD(hy,y);
00037 SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
00038 return x;
00039 }
00040 #endif