Skip to content

fexact.c

2 messages · Jason Turner, Ramon Diaz-Uriarte

#
On Tue, Nov 19, 2002 at 07:03:17PM +0100, Ramon Diaz wrote:
...

Under Linux, use

#include limits.h
#define SINT_MAX INT_MAX

Don't have an SGI machine handy, so I've no idea if that'll work on Irix.

Cheers

Jason
#
Dear All,

I am using fexact.c on a C++ program I wrote. To minimize dependencies on 
other files (e.g., to not need to include R.h and ctest.h ---now I only 
include the R files Boolean.h, Constants.h, and Memory.h), I have re-written 
all declarations of Sints as ints and, what is potentially more serious, I 
have re-written the line (lines 329 and 330, in fexact.c on R-1.6.1) 

 /* IMAX is the largest representable Sint on the machine. */
    const Sint imax = SINT_MAX;

as

    const Sint imax =  2147483647;


I have checked the program on an Intel machine (running Linux and compiled 
with gcc) and on an SGI machine running Irix 5.6 (compiled with gcc and, I 
think, using 32 bits), and so far all results are OK. However, I wonder if I 
am likely to run into problems because of my sloppy hack.

Thanks,