The R Project SVN R

Rev

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

Rev 28002 Rev 28062
Line 159... Line 159...
159
	s6 = (120+c*(346+127*c)) * i5040;
159
	s6 = (120+c*(346+127*c)) * i5040;
160
	ch += t*(1+0.5*t*s1-b*c*(s1-b*(s2-b*(s3-b*(s4-b*(s5-b*s6))))));
160
	ch += t*(1+0.5*t*s1-b*c*(s1-b*(s2-b*(s3-b*(s4-b*(s5-b*s6))))));
161
	if(fabs(q - ch) < EPS2*ch)
161
	if(fabs(q - ch) < EPS2*ch)
162
	    goto END;
162
	    goto END;
163
    }
163
    }
-
 
164
/* no convergence in MAXIT iterations */
-
 
165
#ifdef DEBUG_q
-
 
166
    MATHLIB_WARNING3("qgamma(%g) not converged in %d iterations; rel.ch=%g\n",
-
 
167
		     p, MAXIT, ch/fabs(q - ch));
-
 
168
#else
164
    ML_ERROR(ME_PRECISION);/* no convergence in MAXIT iterations */
169
    ML_ERROR(ME_PRECISION);/* does nothing in R ! */
-
 
170
#endif
165
 END:
171
 END:
166
    return 0.5*scale*ch;
172
    return 0.5*scale*ch;
167
}
173
}