Displaying 1 result from an estimated 1 matches for "notaion".
Did you mean:
notation
2004 Nov 11
5
wrong answer for simple expressions
I am experiencing strange (to me) output when trying to do simple
calculations. Expressions that should equal zero yield non-zero
values.
Examples:
> a <- 4.1-3.1
> b <- 5.1-4.1
> a-b
[1] -4.440892e-16
> (4.1-3.1)-(5.1-4.1)
[1] -4.440892e-16
When this last expression is expanded, I get the right answer:
> 4.1-3.1-5.1+4.1
[1] 0
I am using the binary packaged version