[R] gcc 2.96 {was 'number point under-flow'}

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Feb 4 21:39:01 CET 2004


Martin Maechler <maechler at stat.math.ethz.ch> writes:

> >>>>> "ArneM" ==   <Arne.Muller at aventis.com>
> >>>>>     on Wed, 4 Feb 2004 14:53:11 +0100 writes:
> 
>     ArneM> Hi, yes, I did compile it with gcc 2.96 ... . Do
>     ArneM> you've an estimate on how "bad" this error is,
>     ArneM> e.g. how much it effects the calculations in R?
> 
> In my memory, the effects are bad enough to very quickly drop
> such a version of R and get one which is correctly compiled.
> 
> Even if only 1 in 10000 computations go wrong; you will hardly
> notice and you have chance of knowing which of your final
> results will be inaccurate by how much.

Correct me if I'm wrong, but I don't think the compiler is the only
problem here. I got negative phyper values with Martyn's RPM on RH8.0,
and that appears to have been done with GCC 3.2. The devel version, on
the same machine, gets it right (well, gets a positive result...) and
I do have a vague recollection of seeing a variation of this before, so
I suspect there was a bug and someone fixed it.

Possibly, this records the fix:

    o   [l]choose() use a more accurate formula which also slightly
        improves p- and qhyper(); choose(n, k) now returns 0 instead
        of NaN for k < 0 or > n.

If so, then r-patched should fix it too.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list