Re: [Rd] seq() function accuracy inacceptable (PR#8779)

2006-04-18 Thread Gabor Grothendieck
This is related to this FAQ: http://stat.cmu.edu/R/CRAN/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f What you can do is create the sequence of integers from 6155 to 6200 rather than using floats and then divide by 100 in your subsequent calculation. Until the point you

Re: [Rd] seq() function accuracy inacceptable

2006-04-18 Thread Don MacQueen
Another thing to notice (rather than, it would seem, assume), is that using round() doesn't do any "better": ### without rounding > print(seq(61.55, 61.59, by=.01) , digits=22) [1] 61.547 61.555 61.570 61.578 [5] 61.586 ### with roundi

Re: [Rd] seq() function accuracy inacceptable

2006-04-18 Thread Thomas Lumley
> The seq-command produces unnescessary inaccurate results, which can be > extremely > annoying. I absolutely do not see the nescessity of numerical garbage > to appear in the following simple case. E.g. try this: > > seq ( 61.55 , 62.00 , by=0.01 ) - round ( seq ( 61.55 , 62.00 , by=0.01 ) , >

Re: [Rd] seq() function accuracy inacceptable (PR#8779)

2006-04-18 Thread Henrik Bengtsson (max 7Mb)
On 4/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Full_Name: Johannes Prix > Version: 2.1.1 > OS: WinXP, SuSE Linux > Submission from: (NULL) (137.208.41.195) > > > > The seq-command produces unnescessary inaccurate results, which can be > extremely > annoying. I absolutely do not see th