On Fri, Aug 24, 2012 at 12:48:54PM +0200, Frederik Bertling wrote:
> Hi,
>
> I'm doing some easy calculations to normalize some values. This looks like
> this:
>
> x=mean(a+b+c+d ...)
> a=a-x
> b=b-x
> c=c-x
> d=d-x
> ...
> mean(a+b+c+d ...) ---> Should now be 0!
> However, I'm getting results li
Hello,
This is FAQ 7.31 Why doesn't R think these numbers are equal?
As for your second question whether this behavior is desirable I think
so, we should be aware that floating-point arithmetics has limits. In
your case, a precision limit. At an R pompt run the instructions
?.Machine
.Machin
On Aug 24, 2012, at 5:48 AM, Frederik Bertling
wrote:
> Hi,
>
> I'm doing some easy calculations to normalize some values. This looks like
> this:
>
> x=mean(a+b+c+d ...)
> a=a-x
> b=b-x
> c=c-x
> d=d-x
> ...
> mean(a+b+c+d ...) ---> Should now be 0!
> However, I'm getting results like -2.3152
Hi,
I'm doing some easy calculations to normalize some values. This looks like
this:
x=mean(a+b+c+d ...)
a=a-x
b=b-x
c=c-x
d=d-x
...
mean(a+b+c+d ...) ---> Should now be 0!
However, I'm getting results like -2.315223e-18
This is really near to 0 but not very aesthetic.
Can I prevent this? Or is
4 matches
Mail list logo