Ask HN: What was the last Math formula/concept you used while coding?

10 points by shihn ↗ HN

5 comments

[ 2.9 ms ] story [ 21.4 ms ] thread
Most recently today? Addition. And counting. This isn't "snark", I work in BI. Counting things and knowing what to count is half the job.
Euclidean gcd algorithm to determine colinearity of points on an integer grid. Double precision slope/intercept fails here.
Recently used Euclidean distance, weighted average, N-period moving average and Pearson correlation coefficient.
For production code well, If (p then q) = (NOT p or q)