diff options
Diffstat (limited to 'libf2c/libF77/r_nint.c')
-rw-r--r-- | libf2c/libF77/r_nint.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libf2c/libF77/r_nint.c b/libf2c/libF77/r_nint.c new file mode 100644 index 0000000..f2713d5 --- /dev/null +++ b/libf2c/libF77/r_nint.c @@ -0,0 +1,9 @@ +#include "f2c.h" + +#undef abs +#include <math.h> +double +r_nint (real * x) +{ + return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x)); +} |