[Rd] bug in pretty() (PR#1032)

deepayan@stat.wisc.edu deepayan@stat.wisc.edu
Wed, 25 Jul 2001 19:06:50 +0200 (MET DST)




I have the following output from pretty():


> pretty(c(-.1, 1)) # note 2nd element
[1] -2.000000e-01 -2.775558e-17  2.000000e-01  4.000000e-01  6.000000e-01
[6]  8.000000e-01  1.000000e+00
> as.character(pretty(c(-.1, 1)))
[1] "-0.2"                  "-2.77555756156289e-17" "0.2"                  
[4] "0.4"                   "0.6"                   "0.8"                  
[7] "1"                    


The root cause seems to be here:


> 1.2/6 - .2
[1] -2.775558e-17


(It seems that this is not a problem in all installations.)


<<insert bug report here>>



--please do not edit the information below--

Version:
 platform = i686-pc-linux-gnu
 arch = i686
 os = linux-gnu
 system = i686, linux-gnu
 status = 
 major = 1
 minor = 3.0
 year = 2001
 month = 06
 day = 22
 language = R

Search Path:
 .GlobalEnv, 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._