0

To reproduce:

> 1 - 0.9 - 0.1
[1] -2.775558e-17
> 1 - 0.1 - 0.9
[1] 0
> 1 + (-0.9 -0.1)
[1] 0
> 1 + -0.9 + -0.1
[1] -2.775558e-17
> 1 + (-0.9 + -0.1)
[1] 0
> - 0.9 - 0.1 + 1
[1] 0
> - 0.9 + 1 - 0.1
[1] -2.775558e-17
> - 0.9 + (1 - 0.1)
[1] 0

Can someone explain this behavior?

Add. info:

R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Artem Klevtsov
  • 9,193
  • 6
  • 52
  • 57

0 Answers0