i_dnnt.c 291 B

12345678910111213141516171819
  1. #include "f2c.h"
  2. #ifdef KR_headers
  3. double floor();
  4. integer i_dnnt(x) doublereal *x;
  5. #else
  6. #undef abs
  7. #include "math.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. integer i_dnnt(doublereal *x)
  12. #endif
  13. {
  14. return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
  15. }
  16. #ifdef __cplusplus
  17. }
  18. #endif