Difference of expressions when evaluated in different orders
Haskell, 281 256 characters

(x:o:y:z)%p|p o=(show(m o(read x)$read y::Float):z)%p|1&lt;3=x:o:(y:z)%p;z%_=z
m"+"=(+);m"-"=(-);m"*"=(*);m"/"=(/);m"^"=(**);m _= \a-&gt;abs.(a-)
l=(%(\_-&gt;1&lt;3))
t e=foldl(%)e$map(\w-&gt;(`elem`w).head)["^","*/","+-"]
d e=l$l e++"~":t e
main=interact$concat.d.words


Brief explaintaion:


% reduces an expression, so long as the operator meets some predicate p
show(m o(read x)$read y::Float) applies an operator to the two string arguments, producing a string result
m maps a string to an operator; note the string "~" is mapped to absolute difference
l computes left-to-right order by applying % once, with a predicate that is always true
t computes traditional order by repeatedly applying % with tests that match operators first of higher precedence, then lower
d computes the two values, then forms a new expression with operator ~ and computes that


Runs:

&amp; echo "1 + 2 * 3 ^ 2 - 11 / 2 + 16" | runhaskell 34599-EvalOrder.hs 
21.5

&amp; echo "7 - 1 * 3 ^ 2 + 41 / 3 + 2 * 9 * 2" | runhaskell 34599-EvalOrder.hs 
2178.3333


(Second result differs from example above because this code always computes in floating point.)