>>>>> "Daniel" == Daniel Pemstein
<dbpemste@artsci.wustl.edu>
>>>>> on Wed, 30 Apr 2003 19:20:36 +0200 (MET DST) writes:
Daniel> I was going over the source in src/nmath/pnorm.c and
Daniel> noticed a little bug in pnorm_both (in R 1.7.0).
Daniel> The else-if on line 205 covers the entire real line.
Daniel> Seems you want an &&, not an ||. Doesn't make a big
Daniel> difference (you still get a 0 or 1 from extreme
Daniel> starting values) but your log refinements will
Daniel> always be skipped.
Thank you, Daniel!
You are right about the || typo. However as I found things are
a bit more subtle. The last clause now always has been
skipped and the if( || ) was James Rath's contribution
subsequent to his PR#699 , including the mentioned asymptotic
expansion for the log_p clause.
Now because of the typo that log_p case had not ever been in use
in the past and I know found that part the "*ccum = -0." clearly
is sub-optimal and worse than the current log_p behavior.
Anyway, this is being fixed for 1.7.1, but the patch will be
more than the 2-letter replacement, s/||/&&/
Please let me know (off the mailing list) if you're interested
in more details.
Thanks again.
Martin Maechler <maechler@stat.math.ethz.ch>
http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><