I have a problem that the sum of the variables representing the probabilities in the interval [0,1]is cumulative with 0, but should be >0. The problem is undoubtedly related to the floating point representation and precision in R, but I cannot determine where this is happening.
options(digits = 22)
p1 = 0.8
p2 = 0.9999999999999998
p11 = p1 * p2
p10 = p1 - p11
p01 = p2 - p11
p00 = 1 - p11 - p10 - p01
p11, p10, p01that's all numeric. p00also numericbut
> p00
[1] 0
and p00 == 0in my car TRUE. However, it should not be zero, since it can be shown p00mathematically >0.
, -, , p01 . p01>0 TRUE . p00?
, .. p00? p - [0,1]. log exp, .