Just a comment w.r.t. rounding. The Python way is THE accepted way of rounding 
in Numerical Analysis! Always rounding n+0.5 (where n is integer) up is biased 
and makes problems. People have computed long time astronomical calculations 
and they experienced that our planets leave our solar system. After looking for 
the cause of the failure of their computations, after a lot of debugging, they 
found out that this biased rounding was the culprit. After they have changed 
their code to what is called "round half to even" (Wikipedia) the problem has 
gone. The rule applies to rounding a digit further right to the decimal point, 
as well. E.g. 1.005 is rounded down to 1.000 but 1.015 is rounded up to 1.020.

Reply via email to