From p.dalgaard@kubism.ku.dk  Wed Apr 30 11:03:20 1997
From: p.dalgaard@kubism.ku.dk (Peter Dalgaard BSA)
Date: 30 Apr 1997 12:03:20 +0200
Subject: R-alpha: New Incomplete Beta Function
In-Reply-To: Kurt Hornik's message of Wed, 30 Apr 1997 07:52:23 +0200
References: <199704300456.QAA07452@stat1.stat.auckland.ac.nz>
 <199704300552.HAA17098@aragorn.ci.tuwien.ac.at>
Message-ID: <x2iv144yl3.fsf@bush.kubism.ku.dk>

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: New Incomplete Beta Function
Peter Dalgaard BSA