Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
ffd048a07b4bc3bd01bef71a77b49aa9cee947cf
/
.
/
src
/
math
/
copysignf.c
blob: 0af6ae9b2155da70412f7406e67ab968218d2265 [
file
] [
log
] [
blame
]
#include
<math.h>
#include
<stdint.h>
float
copysignf
(
float
x
,
float
y
)
{
union
{
float
f
;
uint32_t
i
;}
ux
={
x
},
uy
={
y
};
ux
.
i
&=
0x7fffffff
;
ux
.
i
|=
uy
.
i
&
0x80000000
;
return
ux
.
f
;
}