☰
Debian Codegraph
@
0.0~git20260129.ec0effd-3
0.0~git20260129.ec0effd-2
/
/
libc-top-half
/
musl
/
src
/
math
/
copysign.c
☽
☼
libc-top-half/musl/src/math/copysign.c
code
plain
raw
MIT
2005-2019 Rich Felker <
[email protected]
>; 2005-2019 Many other contributors
debian/copyright
1
#include "libm.h"
2
3
double copysign(double x, double y) {
4
union {double f; uint64_t i;} ux={x}, uy={y};
5
ux.i &= -1ULL/2;
6
ux.i |= uy.i & 1ULL<<63;
7
return ux.f;
8
}