The R Project SVN R

Rev

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

Rev 68947 Rev 77685
Line 125... Line 125...
125
    double ans = 0.0, valx0, valx1, x0, x1, xabs;
125
    double ans = 0.0, valx0, valx1, x0, x1, xabs;
126
    int iter;
126
    int iter;
127
 
127
 
128
#ifdef IEEE_754
128
#ifdef IEEE_754
129
    if (ISNAN(p) || ISNAN(rr) || ISNAN(cc) || ISNAN(df)) {
129
    if (ISNAN(p) || ISNAN(rr) || ISNAN(cc) || ISNAN(df)) {
130
	ML_ERROR(ME_DOMAIN, "qtukey");
130
	ML_WARNING(ME_DOMAIN, "qtukey");
131
	return p + rr + cc + df;
131
	return p + rr + cc + df;
132
    }
132
    }
133
#endif
133
#endif
134
 
134
 
135
    /* df must be > 1 ; there must be at least two values */
135
    /* df must be > 1 ; there must be at least two values */
136
    if (df < 2 || rr < 1 || cc < 2) ML_ERR_return_NAN;
136
    if (df < 2 || rr < 1 || cc < 2) ML_WARN_return_NAN;
137
 
137
 
138
    R_Q_P01_boundaries(p, 0, ML_POSINF);
138
    R_Q_P01_boundaries(p, 0, ML_POSINF);
139
 
139
 
140
    p = R_DT_qIv(p); /* lower_tail,non-log "p" */
140
    p = R_DT_qIv(p); /* lower_tail,non-log "p" */
141
 
141
 
Line 183... Line 183...
183
	if (xabs < eps)
183
	if (xabs < eps)
184
	    return ans;
184
	    return ans;
185
    }
185
    }
186
 
186
 
187
    /* The process did not converge in 'maxiter' iterations */
187
    /* The process did not converge in 'maxiter' iterations */
188
    ML_ERROR(ME_NOCONV, "qtukey");
188
    ML_WARNING(ME_NOCONV, "qtukey");
189
    return ans;
189
    return ans;
190
}
190
}