Hello Ralph, To be honest I don't see anything wrong here. The debugger shows full representation of the float/double, which are known to have limited precision. The inconsistencies you see, seem to be associated with debugger representation of the float only, as you can see that 0.1 * 5 results in 0.5 even though 0.1 is shown as 0.100000001. You may also observe some problems when using floating point constants/literals, as by default GCC is set to use double-precision constants. This can be changed in the optimization settings. Enabling this option will also make better use of the FPU on the S7, S5 and S3 devices. Regards
↧