If you do code it yourself, study a reference that approaches things numerically, not merely symbolically; the usual symbolic approach taught in school is often not appropriate numerically. see e.g., https://en.wikipedia.org/wiki/Loss_of_significance#Instabili...
Once you understand why you should teach beginning coders rules like the above, even though they're huge over-simplifications, then use your own common sense instead of these rules.
1 comment
[ 2.6 ms ] story [ 12.0 ms ] threadIf you have the time to do error analysis and performance optimization, then maybe use float; if not, use double. http://www.lsi.upc.edu/~robert/teaching/master/material/p5-g...
If you have to implement a numeric or geometric algorithm, even as simple as "find the intersection of two infinite, non-parallel lines in 2D", use a library; don't code it yourself. https://stackoverflow.com/questions/8585427/precision-issues...
If you do code it yourself, study a reference that approaches things numerically, not merely symbolically; the usual symbolic approach taught in school is often not appropriate numerically. see e.g., https://en.wikipedia.org/wiki/Loss_of_significance#Instabili...
Once you understand why you should teach beginning coders rules like the above, even though they're huge over-simplifications, then use your own common sense instead of these rules.