Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which particular software development tasks have you used math for? And which branch of math did you use?

Tags:

math

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.

like image 287
Brian R. Bondy Avatar asked Nov 27 '22 13:11

Brian R. Bondy


2 Answers

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)

(showAll and s.ShowToUser are both of type bool.)

// Before
(showAll ? (s.ShowToUser || s.ShowToUser == false) : s.ShowToUser)

// After!
showAll || s.ShowToUser

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.

like image 131
Richard Ev Avatar answered Dec 09 '22 20:12

Richard Ev


Linear algebra for 3D rendering and also for financial tools. Regression analysis for the same financial tools, like correlations between financial instruments and indices, and such.

like image 43
Cyrille Ka Avatar answered Dec 09 '22 19:12

Cyrille Ka