this post was submitted on 21 Dec 2023
102 points (94.7% liked)
Programming
17333 readers
150 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
"seeing the differences in the result"
This just means that you are testing against a very narrow output. It's actually pretty common to run across tests that don't even check for the likely failure cases, because the developer(s) don't actually understand the algorithm.
A common example is prime factorisation, most nontrivial factorisation algorithms (Pollard rho, elliptic curves), don't guarantee producing a prime factor they simply tend to produce them because they prioritize small factors. Programmers see that their function produces primes for the one or 2 test cases (out of say 2^64) and assume that it works. It generally does, but when it doesn't you get incorrect results (often undetectably) which poisons all the rest of your calculations.