I’m not looking for a general discussion on if math is important or not for programming.
Instead I’m looking for real world scenarios where you have actually used some branch of math to solve some particular problem during your career as a software developer.
In particular, I’m looking for concrete examples.
I frequently find myself using De Morgan’s theorem when as well as general Boolean algebra when trying to simplify conditionals
I’ve also occasionally written out truth tables to verify changes, as in the example below (found during a recent code review)
(
showAllands.ShowToUserare both of typebool.)I also used some basic right-angle trigonometry a few years ago when working on some simple graphics – I had to rotate and centre a text string along a line that could be at any angle.
Not revolutionary…but certainly maths.