Displaying 1 result from an estimated 1 matches for "r_d_clog".
Did you mean:
  r_dt_clog
  
2004 Apr 11
3
pcauchy precision (PR#6756)
...Submission from: (NULL) (65.213.85.129)
Two things are wrong.
1. There is nan test outside IEEE_754.
2. The meat part of the function should really be something like...
    if (!lower_tail)
	    x = -x;
    if (fabs (x) > 1) {
	    double temp = atan (1 / x) / M_PI;
	    return (x > 0) ? R_D_Clog (temp) : R_D_val (-temp);
    } else
	    return R_D_val (0.5 + atan (x) / M_PI);
...instead of the current heavily truncated series expansion.  The above is
much
simpler and more precise.  (Thanks to Ian Smith for pointing the in-hindsight-
obvious 1/x trick out.)