diff options
Diffstat (limited to 'libf2c/libF77/d_nint.c')
-rw-r--r-- | libf2c/libF77/d_nint.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libf2c/libF77/d_nint.c b/libf2c/libF77/d_nint.c new file mode 100644 index 00000000000..064beff669c --- /dev/null +++ b/libf2c/libF77/d_nint.c @@ -0,0 +1,14 @@ +#include "f2c.h" + +#ifdef KR_headers +double floor(); +double d_nint(x) doublereal *x; +#else +#undef abs +#include <math.h> +double d_nint(doublereal *x) +#endif +{ +return( (*x)>=0 ? + floor(*x + .5) : -floor(.5 - *x) ); +} |