The R Project SVN R

Rev

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

Rev 68947 Rev 69855
Line 53... Line 53...
53
    /* This is not correct for  df1 == 2, ncp > 0 - and seems unneeded:
53
    /* This is not correct for  df1 == 2, ncp > 0 - and seems unneeded:
54
     *  if (x == 0.) return(df1 > 2 ? R_D__0 : (df1 == 2 ? R_D__1 : ML_POSINF));
54
     *  if (x == 0.) return(df1 > 2 ? R_D__0 : (df1 == 2 ? R_D__1 : ML_POSINF));
55
     */
55
     */
56
    if (!R_FINITE(df1) && !R_FINITE(df2)) { /* both +Inf */
56
    if (!R_FINITE(df1) && !R_FINITE(df2)) { /* both +Inf */
57
	/* PR: not sure about this (taken from  ncp==0)  -- FIXME ? */
57
	/* PR: not sure about this (taken from  ncp==0)  -- FIXME ? */
58
	if(x == 1.) return ML_POSINF;
58
	if(x == 1.) return ML_POSINF; else return R_D__0;
59
	/* else */  return R_D__0;
-
 
60
    }
59
    }
61
    if (!R_FINITE(df2)) /* i.e.  = +Inf */
60
    if (!R_FINITE(df2)) /* i.e.  = +Inf */
62
	return df1* dnchisq(x*df1, df1, ncp, give_log);
61
	return df1* dnchisq(x*df1, df1, ncp, give_log);
63
    /*	 ==  dngamma(x, df1/2, 2./df1, ncp, give_log)  -- but that does not exist */
62
    /*	 ==  dngamma(x, df1/2, 2./df1, ncp, give_log)  -- but that does not exist */
64
    if (df1 > 1e14 && ncp < 1e7) {
63
    if (df1 > 1e14 && ncp < 1e7) {