The R Project SVN R

Rev

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

Rev 19500 Rev 24049
Line 70... Line 70...
70
    /* Local Vars  [initialize some for -Wall]: */
70
    /* Local Vars  [initialize some for -Wall]: */
71
    double del, difmuk= 0., E= 0., fk= 0., fx, fy, g, px, py, t, u= 0., v, x;
71
    double del, difmuk= 0., E= 0., fk= 0., fx, fy, g, px, py, t, u= 0., v, x;
72
    double pois = -1.;
72
    double pois = -1.;
73
    int k, kflag, big_mu, new_big_mu = FALSE;
73
    int k, kflag, big_mu, new_big_mu = FALSE;
74
 
74
 
-
 
75
    if (!R_FINITE(mu))
-
 
76
	ML_ERR_return_NAN;
-
 
77
 
75
    if (mu <= 0.)
78
    if (mu <= 0.)
76
	return 0.;
79
	return 0.;
77
 
80
 
78
    big_mu = mu >= 10.;
81
    big_mu = mu >= 10.;
79
    if(big_mu)
82
    if(big_mu)
Line 162... Line 165...
162
 
165
 
163
    if (new_big_mu || mu != muprev2) {
166
    if (new_big_mu || mu != muprev2) {
164
        /* Careful! muprev2 is not always == muprev
167
        /* Careful! muprev2 is not always == muprev
165
	   because one might have exited in step I or S
168
	   because one might have exited in step I or S
166
	   */
169
	   */
167
        muprev2 = mu; 
170
        muprev2 = mu;
168
	omega = M_1_SQRT_2PI / s;
171
	omega = M_1_SQRT_2PI / s;
169
	/* The quantities b1, b2, c3, c2, c1, c0 are for the Hermite
172
	/* The quantities b1, b2, c3, c2, c1, c0 are for the Hermite
170
	 * approximations to the discrete normal probabilities fk. */
173
	 * approximations to the discrete normal probabilities fk. */
171
 
174
 
172
	b1 = one_24 / mu;
175
	b1 = one_24 / mu;