Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
6651ef1f060738ee1f50cac1fe6d8ce64c359022
/
.
/
src
/
math
/
copysign.c
blob: b09331b6876e74ebb5c12bdc9a0ee183ee5cc136 [
file
] [
log
] [
blame
]
#include
"libm.h"
double
copysign
(
double
x
,
double
y
)
{
union
{
double
f
;
uint64_t
i
;}
ux
={
x
},
uy
={
y
};
ux
.
i
&=
-
1ULL
/
2
;
ux
.
i
|=
uy
.
i
&
1ULL
<<
63
;
return
ux
.
f
;
}