summaryrefslogblamecommitdiff
path: root/src/math/copysignl.c
blob: 72a214884779b64339a3916f0e7043c92eaddf7d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                            
#include "libm.h"

#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double copysignl(long double x, long double y)
{
	return copysign(x, y);
}
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
long double copysignl(long double x, long double y)
{
	union ldshape ux = {x}, uy = {y};

	ux.bits.sign = uy.bits.sign;
	return ux.value;
}
#endif