Re: [Rd] pgeom accuracy (PR#6792)

2004-04-19 Thread Morten Welinder
Apologies. Snapshot from rsync --stats -z -rC --delete rsync.r-project.org::r-devel R yesterday which contains the fragment pow(1-p,...) which is problematic for small p. (If the snapshot I get with the above command has an official name I'll be happy to use that in future reports.)

Re: [Rd] pnorm problem (PR#7302)

2004-10-21 Thread Morten Welinder
Mea culpa. Chalk this up to incorrect mucking with the trunc function on my side, a very old bug here. Apologies. Morten __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] pgamma discontinuity (PR#7307)

2004-10-22 Thread Morten Welinder
Make that 30400 orders of magnitude (natural logs y'know)... Right. (/me raises hands showing 2.7 fingers.) What the devil are you calculating? The probability that a random configuration of atoms would make up the known universe? Not quite. Where you see a cdf for the gamma distribution

Re: [Rd] pgamma discontinuity (PR#7307)

2004-10-25 Thread Morten Welinder
A little code study, formula study and experimentation reveals that the situation is mostly fixable: 1. Get rid of the explicit alpha limit. (A form of it is implicit in (2) and (3) below.) 2. Use the series formula when (x alph + 10 x 0.99 * (alph + 1000)) This guarantees

[Rd] Re: [R-SIG-Mac] Bug running pbinom() in R-GUI?

2005-02-22 Thread Morten Welinder
The real problem is that pbeta can take forever. That's bug #7153 and a fix is within reach. Morten __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Re: 1/tan(-0) != 1/tan(0)

2005-06-01 Thread Morten Welinder
For the real problem, the R source (in C), It's simple to work around the fact that qcauchy(0, log=TRUE) for Morten's code proposal gives -Inf instead of +Inf. Ouch. Good catch. Here is what happened: I reduced 1-exp(x) to -expm1(x) which is actual wrong for x=0 because the results will