This is interesting. I have never had this kind of problem with roundoff and conversion in PLCs; just lucky I guess! I have written simulation code that checks results around zero, and sets them to zero exactly if the absolute value of the result is smaller than some value sigma (with sigma set something like 1E-5 or 1E-6).
This problem has been around ever since computers began using 1's and 0's. When I was in school, one instructor showed us a famous problem (in quantization anyway) that has a perfectly obvious solution set of 0 and 2. Change the constants in the equation just slightly, and it blows up.