However if I set this float x to a floating point value like "0.02", Pd will print a value that is only near the target value:
"x 0.2" results in a printout of 0.20000000298
Is there something wrong?
IEEE 754 floating point numbers aren't able to encode 0.2 ... pd's print is rounding to 6 digits, python doesn't round, though ...
see http://en.wikipedia.org/wiki/IEEE_floating-point_standard for details ...
tim