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