annotate ext/clapack/src/i_nint.c @ 221:04c2ac91c16a

Merge
author Chris Cannam
date Tue, 21 May 2019 13:23:35 +0100
parents 45330e0d2819
children
rev   line source
Chris@202 1 #include "f2c.h"
Chris@202 2
Chris@202 3 #ifdef KR_headers
Chris@202 4 double floor();
Chris@202 5 integer i_nint(x) real *x;
Chris@202 6 #else
Chris@202 7 #undef abs
Chris@202 8 #include "math.h"
Chris@202 9 #ifdef __cplusplus
Chris@202 10 extern "C" {
Chris@202 11 #endif
Chris@202 12 integer i_nint(real *x)
Chris@202 13 #endif
Chris@202 14 {
Chris@202 15 return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
Chris@202 16 }
Chris@202 17 #ifdef __cplusplus
Chris@202 18 }
Chris@202 19 #endif