https://stackoverflow.com/questions/9508518/why-are-these-numbers-not-equal
– r2evansOct 15 '20 at 01:23
3
If you look at `.Machine$integer.max`, you'll see that it's likely `2147483647` (10 digits). This is the largest *strict integer* that R can store in 32-bit integers (64-bit ints are a long-sought-after feature, supported by the `bit64` package but not universally used/supported by other packages). While this 32-bit int here is only 10 digits, your number is 19 digits, clearly well outside of what R can use. For this, R defaults to giving you *a number*, which in this case is technically a `numeric` (float/double). When numbers get large, there can be rounding errors, ergo the link above.
– r2evansOct 15 '20 at 01:25
2
the question I've tagged as a duplicate goes in the opposite direction, but the reasoning (and solutions) are applicable in this case as well.
– Ben BolkerOct 15 '20 at 01:26