The R Project SVN R

Rev

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

Rev 19500 Rev 20687
Line 107... Line 107...
107
	}
107
	}
108
 
108
 
109
	/* now evaluate the finite sum, maybe. */
109
	/* now evaluate the finite sum, maybe. */
110
 
110
 
111
	if (q > 1) {
111
	if (q > 1) {
112
	    xb = p * log(y) + q * log(1 - y) - lbeta(p, q) - log(q);
112
	    xb = p * log(y) + q * log1p(-y) - lbeta(p, q) - log(q);
113
	    ib = fmax2(xb / lnsml, 0.0);
113
	    ib = fmax2(xb / lnsml, 0.0);
114
	    term = exp(xb - ib * lnsml);
114
	    term = exp(xb - ib * lnsml);
115
	    c = 1 / (1 - y);
115
	    c = 1 / (1 - y);
116
	    p1 = q * c / (p + q - 1);
116
	    p1 = q * c / (p + q - 1);
117
 
117