You can use iomanip,
cout<<fixed<<showpoint<<setprecision(4);
That way it will output the number to 4 sig figs.
__________________ \"Today\'s scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality.\" Nikola Tesla |