The R Project SVN R

Rev

Rev 77685 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77685 Rev 90186
Line 30... Line 30...
30
    double tmp1, tmp2;
30
    double tmp1, tmp2;
31
#ifdef IEEE_754
31
#ifdef IEEE_754
32
    if (ISNAN(x) || ISNAN(shape) || ISNAN(scale))
32
    if (ISNAN(x) || ISNAN(shape) || ISNAN(scale))
33
	return x + shape + scale;
33
	return x + shape + scale;
34
#endif
34
#endif
35
    if (shape <= 0 || scale <= 0) ML_WARN_return_NAN;
35
    if (shape < 0 || scale <= 0) ML_WARN_return_NAN;
36
 
36
 
37
    if (x < 0) return R_D__0;
37
    if (x < 0) return R_D__0;
38
    if (!R_FINITE(x)) return R_D__0;
38
    if (!R_FINITE(x)) return R_D__0;
39
    /* need to handle x == 0 separately */
39
    /* need to handle x == 0 separately */
40
    if(x == 0 && shape < 1) return ML_POSINF;
40
    if(x == 0 && shape < 1) return ML_POSINF;