For algorithms that seem correct, but aren’t, look at any security vulnerability in decently audited software. A nice example is <a href="https://crocs.fi.muni.cz/public/papers/rsa_ccs17" rel="nofollow">https://crocs.fi.muni.cz/public/papers/rsa_ccs17</a><p>Also, see <i>”Nearly All Binary Searches and Mergesorts are Broken”</i> (<a href="https://research.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html" rel="nofollow">https://research.googleblog.com/2006/06/extra-extra-read-all...</a>), which is caused by the difference between mathematical integers and computer ‘ints’.