Displaying 2 results from an estimated 2 matches for "r_d_val".
2004 Apr 11
3
pcauchy precision (PR#6756)
...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.)
2004 Mar 24
1
R_DT_val accuracy (PR#6692)
Full_Name: M. Welinder
Version: 1.8.1
OS: Solaris
Submission from: (NULL) (65.213.85.227)
Currently R has...
#define R_D_Lval(p) (lower_tail ? (p) : (1 - (p))) /* p */
#define R_D_val(x) (log_p ? log(x) : (x)) /* x in pF(x,..) */
#define R_DT_val(x) R_D_val(R_D_Lval(x)) /* x in pF */
...which is sub-optimal in the lower_tail==FALSE && log_p==TRUE case.
Something like this ought to work better.
#define R_DT_val(x) (log_p ? (lower_tail ? log(x) : log1p (-(x))) :
(R...