Quantcast
Channel: Renesas Synergy Platform
Viewing all articles
Browse latest Browse all 23645

Forum Post: RE: float number rounding issues

$
0
0
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

Viewing all articles
Browse latest Browse all 23645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>