The R Project SVN R

Rev

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

Rev 69855 Rev 77685
Line 45... Line 45...
45
#ifdef IEEE_754
45
#ifdef IEEE_754
46
    /* NaNs propagated correctly */
46
    /* NaNs propagated correctly */
47
    if (ISNAN(x) || ISNAN(a) || ISNAN(b)) return x + a + b;
47
    if (ISNAN(x) || ISNAN(a) || ISNAN(b)) return x + a + b;
48
#endif
48
#endif
49
 
49
 
50
    if (a < 0 || b < 0) ML_ERR_return_NAN;
50
    if (a < 0 || b < 0) ML_WARN_return_NAN;
51
    if (x < 0 || x > 1) return(R_D__0);
51
    if (x < 0 || x > 1) return(R_D__0);
52
 
52
 
53
    // limit cases for (a,b), leading to point masses
53
    // limit cases for (a,b), leading to point masses
54
    if(a == 0 || b == 0 || !R_FINITE(a) || !R_FINITE(b)) {
54
    if(a == 0 || b == 0 || !R_FINITE(a) || !R_FINITE(b)) {
55
	if(a == 0 && b == 0) { // point mass 1/2 at each of {0,1} :
55
	if(a == 0 && b == 0) { // point mass 1/2 at each of {0,1} :