I'm not sure how floating point are represented in C, and how much of a precision someone could get. In a c source file, I have the macro:
#define NUMBER 123.367
In the main function there are these 2 instructions:
float x = NUMBER;
printf("x is %f\n", x);
When I run it, I get:
x is 123.366997
Which is quite close to 123.367, but it kinda messes the purpose of the program. Is there any way to round up x to the desired value? Or is this a flaw of floating point arithmetic-representation that can't be fixed?