I am having some troubles with floating point type. I need to increment a simple FLOAT variable from initially -1.0 up to +1.0 in steps of 0.1 and start thereafter with -1.0 again in a loop.
During debugging I recognized that the content of the variable behaves like: -0.9, -0.8 and then -0.699999 instead of -0.7, and so on. It happens on the real AVR as well as on the simulator. I am using Atmel Studio 7.0 and set the Compiler Optimization Level option to NONE (-O0), Debug Level option MAXIMUM (-g3).
Is there something wrong with my project properties (compiler, debugger etc.).