I was just using python as a calc and I saw this
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 62 * 41.2 * 2 / 250
20.435200000000002
>>> 62 * 4.12 * 2 / 25
20.4352
>>>
Just to be sure I fired the following code through gcc but that did not show me the above behaviour. I understand this is potentially something with rounding off, but it should then be uniform. Why is python adding up the trailing 00000000002 when mathematically it is not supposed to be there.
C/C++ code
#include <stdio.h>
int main () {
printf ("%lf %lf \n", 62 * 41.2 * 2 / 250, 62 * 4.12 * 2 / 25);
}
results in
20.435200 20.435200
If someone is curious about the particular numbers they belong to some engine displacement computation comparisons :)