What\'s the easiest way to truncate a C++ float variable that has a value of 0.6000002 to a value of 0.6000 and store it back in the variable?
float
A good reference for why this happens can be found in What Every Computer Scientist Should Know About Floating Point Arithmetic by David Goldberg.