Mercurial > hg > qm-dsp
annotate ext/clapack/src/i_nint.c @ 202:45330e0d2819 clapack-included
Add the CLAPACK and CBLAS/F2C-BLAS files we use
author | Chris Cannam |
---|---|
date | Fri, 30 Sep 2016 15:51:22 +0100 |
parents | |
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 |