Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
User Journal

Journal andrel's Journal: Rant about numerical-analysis pedagogy

Never again seeing a paragraph like "Quick sort is indeed a very efficient algorithm on average. Press et al. [Numerical Recipes] provide good computer code implementing it." (found in a numerical-methods text aimed at statisticians) is neither a necessary nor a sufficient condition for me to die happy. But it sure wouldn't hurt.

For one thing, Press et al. don't provide good computer code to implement any algorithm. Their code is inefficient, doesn't handle corner cases or error conditions well, and is distributed under a horrible license. And the algorithm they suggest often isn't state of the art. The usual community libraries (GSL, ATLAS, LAPACK, FFTW, etc.) do everything found in NR and are faster, cheaper, better.

This is an especially egregious case, since qsort(3) is a standard library function provided by every modern programming environment. Statisticians (and most other programmers) have no business implementing this algorithm. The teacher who suggests anything other than calling the standard library is doing his students a terrible disservice.

Just so nobody misunderstands: I think NR is an okay expository text. The explanations of elementary numerical analysis aren't bad. They sometimes sacrifice rigor; on the first pass that is a feature not a bug. But the code blows goats. The book would be greatly improved by ripping all the source code out and replacing it with notes on the aforementioned canned libraries.

Current music: Papa Ranger's Reggae Connection [playlist] on KXCI.

This discussion has been archived. No new comments can be posted.

Rant about numerical-analysis pedagogy

Comments Filter:

Remember to say hello to your bank teller.

Working...