remove libm.h includes when math.h and float.h are enough
[musl] / src / math / nearbyintl.c
1 #include <math.h>
2 #include <float.h>
3
4 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5 long double nearbyintl(long double x)
6 {
7         return nearbyint(x);
8 }
9 #else
10 #include <fenv.h>
11 long double nearbyintl(long double x)
12 {
13         fenv_t e;
14
15         fegetenv(&e);
16         x = rintl(x);
17         fesetenv(&e);
18         return x;
19 }
20 #endif