The R Project SVN R

Rev

Rev 4562 | Rev 5458 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4562 Rev 5108
Line 33... Line 33...
33
/* This is basically the same code as  ./phyper.c -- keep in sync! */
33
/* This is basically the same code as  ./phyper.c -- keep in sync! */
34
    double N, xstart, xend, xr, xb, sum, term;
34
    double N, xstart, xend, xr, xb, sum, term;
35
#ifdef IEEE_754
35
#ifdef IEEE_754
36
    if (ISNAN(x) || ISNAN(NR) || ISNAN(NB) || ISNAN(n))
36
    if (ISNAN(x) || ISNAN(NR) || ISNAN(NB) || ISNAN(n))
37
	return x + NR + NB + n;
37
	return x + NR + NB + n;
38
    if(!finite(x) || !finite(NR) || !finite(NB) || !finite(n)) {
38
    if(!R_FINITE(x) || !R_FINITE(NR) || !R_FINITE(NB) || !R_FINITE(n)) {
39
	ML_ERROR(ME_DOMAIN);
39
	ML_ERROR(ME_DOMAIN);
40
	return ML_NAN;
40
	return ML_NAN;
41
    }
41
    }
42
#endif
42
#endif
43
    NR = floor(NR + 0.5);
43
    NR = floor(NR + 0.5);