Hi Dear I am facing a floating-point problem related to the sum of probabilities. It is really difficult to prove that sum of probabilities is 1 because of some minor differences. The MWE is as follows.
> p1=0.99999999 > p2=0.00000000003> p1+p2==1[1] FALSE The sum of probabilities is approximately 1. The difference from 1 is 1-p1-p2 = 9.97e-09, that is very small. I need to apply the sum of probabilities conditions in my many functions. But execution is halted because of floating point. Could anyone please guide about that? Thank you Regards Shaami [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.