initial commit
[libm] / src / math / nearbyintf.c
1 #include <fenv.h>
2 #include "libm.h"
3
4 float nearbyintf(float x) {
5         fenv_t e;
6
7         fegetenv(&e);
8         x = rintf(x);
9         fesetenv(&e);
10         return x;
11 }