From 885f5974cdf65b59415837ae97f5a14ef1350670 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 19:20:15 +0100 Subject: feat: add gzip and new headers --- lib/libm/nearbyintf.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/libm/nearbyintf.c (limited to 'lib/libm/nearbyintf.c') diff --git a/lib/libm/nearbyintf.c b/lib/libm/nearbyintf.c new file mode 100644 index 00000000..c96002b0 --- /dev/null +++ b/lib/libm/nearbyintf.c @@ -0,0 +1,18 @@ +#include +#include + +float nearbyintf(float x) +{ +#ifdef FE_INEXACT +#pragma STDC FENV_ACCESS ON + int e; + + e = fetestexcept(FE_INEXACT); +#endif + x = rintf(x); +#ifdef FE_INEXACT + if (!e) + feclearexcept(FE_INEXACT); +#endif + return x; +} -- cgit v1.2.3