12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #include "cdefs-compat.h"
- #include <openlibm_fenv.h>
- #include <openlibm_math.h>
- #include "math_private.h"
- #ifndef type
- #define type double
- #define roundit rint
- #define dtype long
- #define fn lrint
- #endif
- DLLEXPORT dtype
- fn(type x)
- {
- fenv_t env;
- dtype d;
- feholdexcept(&env);
- d = (dtype)roundit(x);
- if (fetestexcept(FE_INVALID))
- feclearexcept(FE_INEXACT);
- feupdateenv(&env);
- return (d);
- }
|