R-alpha: New Incomplete Beta Function

Peter Dalgaard BSA p.dalgaard@kubism.ku.dk
30 Apr 1997 12:03:20 +0200


Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

> Indeed, `qt(0.975, 3)' now also works on Debian Linux/GNU/ix86 when
> compiled with `-O2 -g'.
> 
> Thanks!
> 
> (Of course, this is the only example I tried thus far ...)
> 

I suspect that the problem will just crop up again with a different
parameter combination. The original problem was really in qbeta.c, not
pbeta.c. Some of those routines are squeezing the last bit of accuracy
out by doing the computations in a carefully planned sequence. Along
comes the gcc optimizer and says "but it's faster to do it this way",
shuffles the instructions around and we get these problems with
termination criteria that are sometimes never met, depending on bit
patterns at the far end of intermediate results.

(The prototypical problem is that in computers, x + delta - x == 0 for
large x and small delta - unless the compiler decides to use
associativity commutativity and eliminate the x'es. Slightly more
elaborate version is x+delta-y with x and y already in registers and
being almost equal.)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-