From paradis@isem.univ-montp2.fr  Wed Dec 26 12:07:57 2001
From: paradis@isem.univ-montp2.fr (paradis@isem.univ-montp2.fr)
Date: Wed, 26 Dec 2001 13:07:57 +0100 (MET)
Subject: [Rd] bug with var(rep(1e30, 3)) (PR#1228)
Message-ID: <200112261207.NAA13242@pubhealth.ku.dk>

There seems to be a bug with var() when the argument is a vector with
exactly three values of 1e30 (or close to this value). This does not happen
with twice, four (or more) times this value, or another value.


> var(rep(1e30, 3))
[1] 2.971056e+28
> var(rep(1.2e30, 3))
[1] 2.971056e+28
> var(rep(0.9e30, 3))
[1] 2.971056e+28
> var(rep(0.8e30, 3))
[1] 0
> var(rep(1e29, 3))
[1] 0
> var(rep(1e30, 2))
[1] 0
> var(rep(1e30, 4))
[1] 0
> var(rep(1e31, 3))
[1] 0


The bug is repeatable, and I got the same results with R 1.3.1 (binary from
CRAN) and R 1.4.0 (binary from BD Ripley's site) both on Windows NT, and R
1.4.0 on Solaris (compiled from sources).



Emmanuel Paradis
Laboratoire de Palontologie
Institut des Sciences de l'volution
Universit Montpellier II
F-34095 Montpellier cdex 05
France
   phone: +33  4 67 14 39 64
     fax: +33  4 67 14 36 10
  mailto:paradis@isem.univ-montp2.fr

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] bug with var(rep(1e30, 3)) (PR#1228)
paradis@isem.univ-montp2.fr