Re: [R] calculate differences - strange outcome

2008-07-20 Thread Bernardo Rangel Tura
Em Qui, 2008-07-17 às 11:47 +0200, Kunzler, Andreas escreveu: Dear List, I ran into some trouble by calculating differences. For me it is important that differences are either 0 or not. So I don't understand the outcome of this calculation 865.56-(782.86+0+63.85+18.85+0) [1]

[R] calculate differences - strange outcome

2008-07-17 Thread Kunzler, Andreas
Dear List, I ran into some trouble by calculating differences. For me it is important that differences are either 0 or not. So I don't understand the outcome of this calculation 865.56-(782.86+0+63.85+18.85+0) [1] -1.136868e-13 I run R version 2.71 on WinXP I could solve my problem by using

Re: [R] calculate differences - strange outcome

2008-07-17 Thread Berwin A Turlach
On Thu, 17 Jul 2008 11:47:42 +0200 Kunzler, Andreas [EMAIL PROTECTED] wrote: I ran into some trouble by calculating differences. For me it is important that differences are either 0 or not. If that is the case, restrict yourself to calculating with integers. :) So I don't understand the

Re: [R] calculate differences - strange outcome

2008-07-17 Thread Mark Difford
Hi Andreas, It's because you are dealing with binary or floating point calculations, not just a few apples and oranges, or an abacus (which, by the way, is an excellent calculating device, and still widely used in some [sophisticated] parts of the world).

Re: [R] calculate differences - strange outcome

2008-07-17 Thread Duncan Murdoch
Kunzler, Andreas wrote: Dear List, I ran into some trouble by calculating differences. For me it is important that differences are either 0 or not. So I don't understand the outcome of this calculation 865.56-(782.86+0+63.85+18.85+0) [1] -1.136868e-13 I run R version 2.71 on WinXP I could