I haveThen the output is 0.5 butCode:double m=0.5; cout<<setprecision(20);
the output is 0.59999999999999999998Code:double m=0.6; cout<<setprecision(20);
What happens and how can I fix this error ?
Thanks in advance,
|
Results 1 to 3 of 3
Thread: setprecision Help please...
|
Click Here to Expand Forum to Full Width |