-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, all, I swear, bug.report() ate my message! Apologies to all, esp. Peter who will once again have to clean up after my mess... The bug report was supposed to say: R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". -- David Brahm (brahm@alum.mit.edu) Version: platform = sparc-sun-solaris2.6 arch = sparc os = solaris2.6 system = sparc, solaris2.6 status = major = 1 minor = 3.0 year = 2001 month = 06 day = 22 language = R Search Path: .GlobalEnv, package:misc, package:io, package:arrays, package:ls1, package:db, package:ts, package:ctest, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thomas Lumley <tlumley@u.washington.edu> writes:> On Mon, 22 Oct 2001, David Brahm wrote: > > > Hi, all, > > > > I swear, bug.report() ate my message! Apologies to all, esp. Peter who > > will once again have to clean up after my mess... > > > > The bug report was supposed to say: > > > > R> round(100000/3, -2) - 33300 > > [1] -7.275958e-12 > > > > I would have hoped for 0. The problem seems to be specifically for negative > > "digits". > > -- David Brahm (brahm@alum.mit.edu) > > > > Version: > > platform = sparc-sun-solaris2.6 > > arch = sparc > > os = solaris2.6 > > system = sparc, solaris2.6 > > status > > major = 1 > > minor = 3.0 > > ^^^^^^^^ > I can duplicate this under Windows R1.3.0 but not Debian R1.3.1, so it may > have been fixed. Looking at the changes to arithmetic.c I don't see why, > though.It's an accuracy issue, still there in 1.3.1 for Solaris 7. Basically, dividing by 10^-2 does not always give an integer on SPARC, so we should be more careful with the logic in fround.c. Beats me why it would act up on windows, but, well, ... [Cc: to r-bugs so that we get it filed properly] -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 22 Oct 2001, David Brahm wrote:> Hi, all, > > I swear, bug.report() ate my message! Apologies to all, esp. Peter who > will once again have to clean up after my mess... > > The bug report was supposed to say: > > R> round(100000/3, -2) - 33300 > [1] -7.275958e-12 > > I would have hoped for 0. The problem seems to be specifically for negative > "digits". > -- David Brahm (brahm@alum.mit.edu)Fixed for R-devel. Now for digits <=0 a final rounding to integer is done in fround. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._