Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-14 Thread Douglas Bates
In the R Programming Style thread on R-help Ronald Rau gave a list of aphorisms from Elements of Programming Style by Kernighan and Plauger. These include 10.0 times 0.1 is hardly ever 1.0 I think that should be included in FAQ 7.31 __

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-13 Thread Heikki Kaskelma
hadley wickham: It's more than that as though, as floating point addition is no longer guaranteed to be commutative or associative, and multiplication does not distribute over addition. Many concepts that are clear cut in pure math become fuzzy in floating point math - equality, singularity

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-13 Thread Prof Brian Ripley
On Wed, 13 Feb 2008, Heikki Kaskelma wrote: hadley wickham: It's more than that as though, as floating point addition is no longer guaranteed to be commutative or associative, and multiplication does not distribute over addition. Many concepts that are clear cut in pure math become fuzzy in

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-13 Thread Barry Rowlingson
hadley wickham wrote: It's more than that as though, as floating point addition is no longer guaranteed to be commutative or associative, and multiplication does not distribute over addition. Many concepts that are clear cut in pure math become fuzzy in floating point math - equality,

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-13 Thread Ted Harding
On 13-Feb-08 12:40:48, Barry Rowlingson wrote: hadley wickham wrote: It's more than that as though, as floating point addition is no longer guaranteed to be commutative or associative, and multiplication does not distribute over addition. Many concepts that are clear cut in pure math become

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread hadley wickham
I'm thinking (by now quite strongly) that there is a place in Introduction to R (and maybe other basic documentation) for an account of arithmetic precision in R (and in digital computation generally). A section Arithmetic Precision in R near the beginning would alert people to this issue

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Greg Snow
] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, February 12, 2008 8:32 AM To: [EMAIL PROTECTED] Subject: Re: [Rd] 0.450.45 = TRUE (PR#10744) On 12-Feb-08 14:53:19, Gavin Simpson wrote: On Tue, 2008-02-12 at 15:35 +0100, [EMAIL PROTECTED] wrote: Dear developer, in my version of R (2.4.0

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Ted Harding
On 12-Feb-08 14:53:19, Gavin Simpson wrote: On Tue, 2008-02-12 at 15:35 +0100, [EMAIL PROTECTED] wrote: Dear developer, in my version of R (2.4.0) as weel as in a more recent version (2.6.0) on different computers, we found this problem : No problem in R. This is the FAQ of all FAQs (Type

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Gabor Csardi
:) It is a good idea, but i don't it would work. We'd have hundreds of emails on R-help and R-devel complaining about mysterious warning messages for code that had been working just fine for two years Gabor On Tue, Feb 12, 2008 at 11:13:36PM +0800, Berwin A Turlach wrote: On Tue, 12 Feb

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Berwin A Turlach
On Tue, 12 Feb 2008 15:47:56 +0100 Gabor Csardi [EMAIL PROTECTED] wrote: OMG, not again please! FAQ 7.31. Yeah, there seems to be a cluster of that type of questions at the moment. Perhaps it is time to introduce a global option HaveReadFAQ7.31 whose default is FALSE but can be changed via

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Gavin Simpson
On Tue, 2008-02-12 at 15:35 +0100, [EMAIL PROTECTED] wrote: Dear developer, in my version of R (2.4.0) as weel as in a more recent version (2.6.0) on different computers, we found this problem : No problem in R. This is the FAQ of all FAQs (Type III SS is probably up there as well). See

Re: [Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread Duncan Murdoch
On 2/12/2008 9:35 AM, [EMAIL PROTECTED] wrote: Dear developer, in my version of R (2.4.0) as weel as in a more recent version (2.6.0) on different computers, we found this problem : This is not a bug, it's a limitation of finite precision arithmetic, and it's FAQ 7.31. Duncan Murdoch

[Rd] 0.450.45 = TRUE (PR#10744)

2008-02-12 Thread labonne
Dear developer, in my version of R (2.4.0) as weel as in a more recent version (2.6.0) on different computers, we found this problem : a-(58/40-1) a [1] 0.45 b-(18/40) b [1] 0.45 ab [1] TRUE a==b [1] FALSE Something seems wrong here. but if we do c-0.45 d-0.45 cd [1] FALSE