I'm using Visual Studio Code and I have the following code:
double a = 0.10;
printf("%.20lf", a);
I got the result
0.10000000000000001000
Why does the value have '1000' at the end there? Shouldn't it be all zeros after '0.1'?
I'm using Visual Studio Code and I have the following code:
double a = 0.10;
printf("%.20lf", a);
I got the result
0.10000000000000001000
Why does the value have '1000' at the end there? Shouldn't it be all zeros after '0.1'?