

Crash course in mathematical notation for programmers  - athesyn
http://moshez.wordpress.com/2012/09/01/crash-course-in-mathematical-notation-for-programmers/

======
csense
Love the idea of the post!

But there some issues:

Sum and product should use range(n+1). Math notation includes both endpoints;
Python excludes the right endpoint.

The sum code could be written closer to the mathematical "idiom" as sum(a(i)
for i in range(n)).

Using 'l' (lowercase L) as a variable is bad because it looks like '1'
(literal one) in many fonts. Call your list 'u' or something, not 'l'.

The binary search code ends abruptly. Maybe it was eaten by the CMS?

And general suggestions:

Split big-O notation into different article, since it's a large topic.

The circle operator is often used for function composition; Python's
Pythonicness makes it easy to say something like circ = lambda f, g : lambda
_a,_ _k : f(g(_ a, __k))

You should also mention that sometimes symbols depend on context. Operators in
Python can have different semantics if they're overloaded; identical names can
have different meaning due to scope effects, or if different libraries are
imported. Likewise, notations in math can have different meanings; you have to
be aware of both commonly accepted "default" meanings (just like '+' has
built-in meanings for ints, floats, lists and strings) and any less-standard
meaning that may have been defined in previous "code" (mathematical text).

