The issue that i encounter is when i try to separate the integer and fractional part of a real number.
long double x,y;
x=121.09;
y=(long)x;
x=x-(long)x;
Y becomes 121, x in the debugger appears as 0.08999999 but writing it to console shows 0.09.
Also,
double x;
int y;
x=121.09;
y=x;
x=x-y;
Gives the same results. Why is that? I would need a clean 0.09 as i want to get that as an integer (0.09 -> 9)
How can i get the fractional part of the number without modf?