search for: outfor

Displaying 1 result from an estimated 1 matches for "outfor".

Did you mean: outform
2006 Dec 19
1
precision when calling a C function; presence of Fortran call
...g-point operation. I have C functions void test1(int *n, double *f){ int outC; double c0; c0 = (double) *n * *f; outC = floor(c0); printf("when f computed by R, C says %d by itself\n",outC); } void test2(int *n, double *f){ extern int F77_NAME(ifloor)(double *); int outC,outFor; double c0; c0 = (double) *n * *f; outFor = F77_CALL(ifloor)(&c0); outC = floor(c0); printf("when f computed by R, C says %d, Fortran says %d\n",outC,outFor); } where the Fortran function ifloor is integer function ifloor(x) DOUBLE PRECISION x ifloor=x...