Re:
by xigoi on Sunday November 05, 2023 @09:46AM
(#38151566)
a + b + a * b
[ Parent
| on HN ]
Re:
by moritzwarhier on Sunday November 05, 2023 @10:03AM
(#38151708)
This is the obvious solution I was looking for. Thanks!
(and I rightfully feel stupid now)
The formula is slightly wrong though. This is the right one:
a or b = a + b - (a * b)
The last term is equivalent to a conjunction. Which also makes sense when you think of probability:
P(a or b) = P(a) + P(b) - P(a and b)
Re:
by moritzwarhier on Sunday November 05, 2023 @12:19PM
(#38153184)
Awesome, thanks!
I've seen this formula I think, and for mod 2 addition, there is no difference I guess.