projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remove another invalid skip of locking in ungetwc
[oweals/musl.git]
/
src
/
math
/
fabsf.c
diff --git
a/src/math/fabsf.c
b/src/math/fabsf.c
index 516f11046ace4a27d3e093ce33253c7a6ca5f069..4efc8d686dcc49e9c4d1c1af5159f042bf5a90d5 100644
(file)
--- a/
src/math/fabsf.c
+++ b/
src/math/fabsf.c
@@
-1,10
+1,9
@@
-#include "libm.h"
+#include <math.h>
+#include <stdint.h>
float fabsf(float x)
{
- union fshape u;
-
- u.value = x;
- u.bits &= (uint32_t)-1 / 2;
- return u.value;
+ union {float f; uint32_t i;} u = {x};
+ u.i &= 0x7fffffff;
+ return u.f;
}