this post was submitted on 21 Dec 2023
101 points (93.9% liked)
Programming
17424 readers
27 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
Just try it and decide for yourself. Make the computer do the math. I've done tons of angle stuff with quaternions in code and what the fuck even is a quaternion. What even is a matrix or imaginary number. Computer doesn't care that I don't know and just does what I tell it to. Results may not be what I hoped for sometimes but I can usually figure out what I did wrong after seeing the differences in the result.
"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.