[EMAIL PROTECTED]
Cc: R help [EMAIL PROTECTED]
Sent: Tuesday, 9 December, 2008 16:30:08
Subject: RE: [R] Logical inconsistency
Some (possibly all) of those numbers cannot be represented exactly, so
there is a chance of round off error whenever you do some arithmetic,
sometimes the errors
PROTECTED]
Sent: Thu, 11 Dec 2008 11:53:01 +0200
Subject: Re: [R] Logical inconsistency
Rounding can do no good because
round(8.8,1)-round(7.8,1)1
# still TRUE
round(8.8)-round(7.7)1
# FALSE
What you might do is compute a-b-1 and compare it to a very small number:
(8.8-7.8-1) 1e-10
PROTECTED]
Sent: Thu, 11 Dec 2008 11:53:01 +0200
Subject: Re: [R] Logical inconsistency
Rounding can do no good because
round(8.8,1)-round(7.8,1)1
# still TRUE
round(8.8)-round(7.7)1
# FALSE
What you might do is compute a-b-1 and compare it to a very small number:
(8.8-7.8-1
On Thu, 2008-12-11 at 17:23 +0200, Kenn Konstabel wrote:
Hi,
I agree -- and my examples using round were meant as bad and dangerous
examples. Using round at the last step is better and may solve the problem,
but in your example ...
round(8.8-7.8,1)==1
[1] TRUE
... you have to know in
]; Chuck Cleland [EMAIL
PROTECTED]
Cc: R help [EMAIL PROTECTED]
Sent: Tuesday, 9 December, 2008 16:30:08
Subject: RE: [R] Logical inconsistency
Some (possibly all) of those numbers cannot be represented exactly, so there is
a chance of round off error whenever you do some arithmetic, sometimes
Of emma jane
Sent: Tuesday, December 09, 2008 7:02 AM
To: Bernardo Rangel Tura; Wacek Kusnierczyk; Chuck Cleland
Cc: R help
Subject: Re: [R] Logical inconsistency
Many thanks for your help, perhaps I should have set my query in
context !
I'm simply calculating an indicator variable [0,1] based
]
.com.br; Wacek Kusnierczyk [EMAIL PROTECTED]; Chuck
Cleland [EMAIL PROTECTED]
Cc: R help [EMAIL PROTECTED]
Sent: Tuesday, 9 December, 2008 16:30:08
Subject: RE: [R] Logical inconsistency
Some (possibly all) of those numbers cannot be represented exactly, so
there is a chance of round off error
On Tue, 2008-12-09 at 06:02 -0800, emma jane wrote:
Many thanks for your help, perhaps I should have set my query in context
!
I'm simply calculating an indicator variable [0,1] based on the whether the
difference between two measured variables is 1 or =1.
I understand the FAQ
[EMAIL PROTECTED]
Sent: Saturday, 6 December, 2008 10:00:48
Subject: Re: [R] Logical inconsistency
On Fri, 2008-12-05 at 14:18 +0100, Wacek Kusnierczyk wrote:
Berwin A Turlach wrote:
Dear Emma,
On Fri, 5 Dec 2008 04:23:53 -0800 (PST)
Â
Â
Please could someone kindly explain
: Tuesday, December 09, 2008 7:02 AM
To: Bernardo Rangel Tura; Wacek Kusnierczyk; Chuck Cleland
Cc: R help
Subject: Re: [R] Logical inconsistency
Many thanks for your help, perhaps I should have set my query in
context !
I'm simply calculating an indicator variable [0,1] based
Patrick Connolly wrote:
On Mon, 08-Dec-2008 at 02:05AM +0800, Berwin A Turlach wrote:
| G'day Wacek,
|
| On Sat, 06 Dec 2008 10:49:24 +0100
| Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
|
| []
| there is, in principle, no problem in having a high-level language
| perform the
And here one is very much inclined to chirp in and say, A matchless Wacek
strikes again.
Regards, and thanks to all for a most entertaining (and enlightening)
thread.
Wacek Kusnierczyk wrote:
Patrick Connolly wrote:
On Mon, 08-Dec-2008 at 02:05AM +0800, Berwin A Turlach wrote:
| G'day
Patrick Connolly wrote:
On Mon, 08-Dec-2008 at 02:05AM +0800, Berwin A Turlach wrote:
| G'day Wacek,
|
| On Sat, 06 Dec 2008 10:49:24 +0100
| Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
|
| []
| there is, in principle, no problem in having a high-level language
| perform the
Berwin A Turlach wrote:
I am not surprised about CS guys never learning about these issues. As
long as you play around with data bases (their organisation c),
sorting algorithms, artificial intelligence (at least when I attended a
lecture on this) you do not need to know about these issues.
G'day Wacek,
On Mon, 08 Dec 2008 13:13:33 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
Berwin A Turlach wrote:
I am not surprised about CS guys never learning about these
issues. As long as you play around with data bases (their
organisation c), sorting algorithms, artificial
G'day Wacek,
On Sun, 07 Dec 2008 21:09:36 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
g'evening.
Not the done thing.
c'mon, a person from central europe can't possibly be unaware of this
joke.
I wouldn't call Norway central Europe, but then I also guess that you
are not really
John C Nash wrote:
This actually goes back a very long way. Peter is right to remind us
that optimizers (in the sense of compilers) can corrupt algorithms
that are well-designed. Optimizing in tests is something some of us have
fought for nearly 40 years, but compiler writers don't do much
Stavros Macrakis wrote:
On Sat, Dec 6, 2008 at 4:32 PM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
Stavros Macrakis wrote:
On Sat, Dec 6, 2008 at 5:02 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
yepp, though (2/3)*3 not evaluating to 2 is again not a must, is it.
G'day Wacek,
On Sat, 06 Dec 2008 10:49:24 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
[]
there is, in principle, no problem in having a high-level language
perform the computation in a logically consistent way.
Is this now supposed to be a Radio Eriwan joke? As another saying
On Mon, 8 Dec 2008, Berwin A Turlach wrote:
G'day Wacek,
On Sat, 06 Dec 2008 10:49:24 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
[]
there is, in principle, no problem in having a high-level language
perform the computation in a logically consistent way.
Is this now supposed to be
On 07-Dec-08 18:41:16, Charles C. Berry wrote:
On Mon, 8 Dec 2008, Berwin A Turlach wrote:
G'day Wacek,
On Sat, 06 Dec 2008 10:49:24 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
[]
there is, in principle, no problem in having a high-level language
perform the computation in a
Berwin A Turlach wrote:
G'day Wacek,
g'evening.
On Sat, 06 Dec 2008 10:49:24 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
[]
there is, in principle, no problem in having a high-level language
perform the computation in a logically consistent way.
Is this now
Stavros Macrakis wrote:
On Sun, Dec 7, 2008 at 3:51 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
(* (/ 2.0 3.0) 3.0) is not exact either, as aren't (* (/ 2.0 2.0)
2.0)...
Actually, they *are* all exact in any system using IEEE floats.
not per definitionem of
On Mon, 08-Dec-2008 at 02:05AM +0800, Berwin A Turlach wrote:
| G'day Wacek,
|
| On Sat, 06 Dec 2008 10:49:24 +0100
| Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
|
| []
| there is, in principle, no problem in having a high-level language
| perform the computation in a logically
On Fri, Dec 5, 2008 at 8:18 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
well, this answer the question only partially. this explains why a
system with finite precision arithmetic, such as r, will fail to be
logically correct in certain cases. it does not explain why r, a
language said
Berwin A Turlach wrote:
G'day Wacek,
On Fri, 05 Dec 2008 14:18:51 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
well, this answer the question only partially. this explains why a
system with finite precision arithmetic, such as r, will fail to be
logically correct in certain cases.
On Fri, 2008-12-05 at 14:18 +0100, Wacek Kusnierczyk wrote:
Berwin A Turlach wrote:
Dear Emma,
On Fri, 5 Dec 2008 04:23:53 -0800 (PST)
emma jane [EMAIL PROTECTED] wrote:
Please could someone kindly explain the following inconsistencies
I've discovered__when performing logical
Stavros Macrakis wrote:
On Fri, Dec 5, 2008 at 8:18 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
well, this answer the question only partially. this explains why a
system with finite precision arithmetic, such as r, will fail to be
logically correct in certain cases. it does not
On Sat, Dec 6, 2008 at 5:02 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
yepp, though (2/3)*3 not evaluating to 2 is again not a must, is it.
Why is that less a must than .3-.2 == .1? On the contrary, the computing
convention (and for that matter the usual scientific and engineering
Stavros Macrakis wrote:
On Sat, Dec 6, 2008 at 5:02 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
yepp, though (2/3)*3 not evaluating to 2 is again not a must, is it.
Why is that less a must than .3-.2 == .1? On the contrary, the computing
convention (and for that matter the
On Sat, Dec 6, 2008 at 4:32 PM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
Stavros Macrakis wrote:
On Sat, Dec 6, 2008 at 5:02 AM, Wacek Kusnierczyk
[EMAIL PROTECTED] wrote:
yepp, though (2/3)*3 not evaluating to 2 is again not a must, is it.
Why is that less a must than .3-.2 == .1?
This comment is orthogonal to most of the others. It seems that folk often
want to test for equality of real numbers. One important one is for
convergence tests. When writing my Compact Numerical Methods book I had to
avoid lots of logical tests, but wanted to compare two REALs. I found that
the
[EMAIL PROTECTED] wrote:
This comment is orthogonal to most of the others. It seems that folk often
want to test for equality of real numbers. One important one is for
convergence tests. When writing my Compact Numerical Methods book I had to
avoid lots of logical tests, but wanted to compare
This actually goes back a very long way. Peter is right to remind us
that optimizers (in the sense of compilers) can corrupt algorithms
that are well-designed. Optimizing in tests is something some of us have
fought for nearly 40 years, but compiler writers don't do much
floating-point
Dear colleagues
Please could someone kindly explain the following inconsistencies I've
discovered when performing logical calculations in R:
8.8 - 7.8 1
TRUE
8.3 - 7.3 1
TRUE
Thank you,
Emma Jane
[[alternative HTML version deleted]]
On 12/5/2008 7:23 AM, emma jane wrote:
Dear colleagues
Please could someone kindly explain the following inconsistencies I've
discovered when performing logical calculations in R:
8.8 - 7.8 1
TRUE
8.3 - 7.3 1
TRUE
See R FAQ 7.31
Dear Emma,
On Fri, 5 Dec 2008 04:23:53 -0800 (PST)
emma jane [EMAIL PROTECTED] wrote:
Please could someone kindly explain the following inconsistencies
I've discovered__when performing logical calculations in R:
8.8 - 7.8 1
TRUE
8.3 - 7.3 1
TRUE
Gladly: FAQ 7.31
Berwin A Turlach wrote:
Dear Emma,
On Fri, 5 Dec 2008 04:23:53 -0800 (PST)
emma jane [EMAIL PROTECTED] wrote:
Please could someone kindly explain the following inconsistencies
I've discovered__when performing logical calculations in R:
8.8 - 7.8 1
TRUE
8.3 - 7.3 1
G'day Wacek,
On Fri, 05 Dec 2008 14:18:51 +0100
Wacek Kusnierczyk [EMAIL PROTECTED] wrote:
well, this answer the question only partially. this explains why a
system with finite precision arithmetic, such as r, will fail to be
logically correct in certain cases. it does not explain why r, a
39 matches
Mail list logo