by dstick · 4y ago · 0 comments
A fairly frequent crash bug was caused by a line with a comment explaining that it could theoretically cause a crash but that risk would be one in a million.
Pr[something happens across 1_000_000 events]
= 1 - Pr[nothing happens across 1_000_000 events]
= 1 - Pr[nothing happens once]^1_000_000 ## assuming independence
= 1 - (1 - Pr[something happens once])^1_000_000
= 1 - (1 - 1/1_000_000)^1_000_000
≈ 1 - 0.378
= 0.632
It's still below 99% for 4 million ops.
Okay, but they said millions.
> It's still below 99% for 4 million ops.
I find this misleading, because it's... 98%.
Which completely undermines your argument. If something happens 98% of days, it's fine to call that "every day".