diff --git a/src/code/math/_util.h b/src/code/math/_util.h deleted file mode 100644 index e640e7a..0000000 --- a/src/code/math/_util.h +++ /dev/null @@ -1,10 +0,0 @@ - -#define asuint64(x) ((union {double f; uint64_t i;}){x}).i -#define asdouble(x) ((union {double f; uint64_t i;}){x}).f - -#include <_compiler.h> -#if defined(_compiler_clang) || defined(_compiler_gnu) - #define just_do_it(t) __attribute__((unused)) volatile t -#else - #define just_do_it(t) volatile t -#endif diff --git a/src/code/math/round.c b/src/code/math/round.c index 4b7f1f5..96a6659 100644 --- a/src/code/math/round.c +++ b/src/code/math/round.c @@ -5,7 +5,15 @@ #include #include -#include "_util.h" +#define asuint64(x) ((union {double f; uint64_t i;}){x}).i +#define asdouble(x) ((union {double f; uint64_t i;}){x}).f + +#include <_compiler.h> +#if defined(_compiler_clang) || defined(_compiler_gcc) + #define just_do_it(t) __attribute__((unused)) volatile t +#else + #define just_do_it(t) volatile t +#endif double nearbyint(double x) { #pragma STDC FENV_ACCESS ON