This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Round of and data precision in Cortex-M4

Hi,
I am using STM32F429-Discovery Board (Cortex-M4). When I define/assign the value to any variable/constant ex. #define X 3.14159265 or float32_t Y=0.30945 etc then it changed to X=3.14159274 or Y= 0.309450001 respectively while these variables/constants are used anywhere in the program.
How should I define these variables/constants that it should not be changed?

P.S.
In my code there are some functions which get the inverse of the values (in range of 10^-8 and 10^-9) and it makes a big difference in the result.

0