3
$\begingroup$

Does there exist a simple, cheatsheet-like document which compiles the best practices for mathematical computing? If not, could someone respond with a list of the top best practices? E.g., it would include items like:

  1. For large numerical vectors x, instead of computing x^2, compute x*x. This speeds up calculations for reasons...(?)
  2. To solve a system $Ax = b$, never solve $A^{-1}$ and left-multiply $b$. Lower order algorithms exist (e.g., Gaussian elimination)

BACKGROUND: I'm finding papers where programmatic implementations are quite different from what derived analytic expressions would suggest. Different factorings, expansions, and approximations are used all over the place. I don't think it's simply arbitrary. But the problem is that I have no sense of WHY they're doing what they're doing. I think a cheatsheet-like document would help with this.

UDPATE: I did find a nice numerical analysis cheatsheet here. But I'm looking for something quicker and dirtier

$\endgroup$
17
  • 4
    $\begingroup$ This question is much too broad (every software system is different, and there are a LOT of these...), so I am voting to close until this is big-list/community-wiki $\endgroup$
    – Igor Rivin
    Commented Sep 21, 2011 at 16:27
  • 1
    $\begingroup$ Yes, this is actually too broad as Igor points out. Even though rules of thumb encode a compressed version of wisdom and experience acquired over the years, they are no substitute for system (architecture, hardware, etc.) and algorithm specific tuning. $\endgroup$
    – Suvrit
    Commented Sep 21, 2011 at 16:33
  • 3
    $\begingroup$ I am afraid the answer is "No, you really have to take at least that basic course in numerical analysis, or at least browse a book on the subject". $\endgroup$ Commented Sep 21, 2011 at 17:14
  • 1
    $\begingroup$ I suspect item 1 means "Compute x DOT x, instead of |x|^2", and that the reason this is faster is that the computation of |x| proceeds by computing sqrt(x DOT x)... $\endgroup$ Commented Sep 21, 2011 at 18:25
  • 4
    $\begingroup$ "...old Prince Lasgere of Tsort asked me how he could become learned, especially since he hadn't got any time for this reading business. I said to him There is no royal road to learning, sire' and he said to me Bloody well build one or I shall have your legs chopped off. Use as many slaves as you like.' A refreshingly direct approach, I always thought. Not a man to mince words. People, yes. But not words." $\endgroup$
    – Will Jagy
    Commented Sep 21, 2011 at 20:45

0

Browse other questions tagged .