Hacker News new | past | comments | ask | show | jobs | submit login

Actually, I'd say writing perfect code in the mathematical domain is extremely hard - floating point types are a minefield and infinite-precision arithmetic is a minefield also if you consider the possibilities for running-times exploding. For example, code for the mean of a list of numbers is a hard problem when looked at in its full generality [1] - and that's using forgiving definition of "perfect" - alway correct and terminating, running at a reasonable speed.

[1] http://hypothesis.works/articles/calculating-the-mean/




Great link! But also, the mean is itself an imperfect summary of some distributions. Any single-number summary will be misleading in some cases.


Anscombe's quartet is a great illustration of that.

https://en.wikipedia.org/wiki/Anscombe%27s_quartet


That's really cool! Btw, I'd love to drop that line into casual conversation some time. "Anscombe's quartet" has a nice flow to it.


Floating point isn't really the baseline for great mathematical structure, it's just a pervasive hardware standard.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: