Thread: Stuck on Pi...
View Single Post
Old 02-21-2005, 09:30 PM   #2 (permalink)
gab00n
 
Super Techie

Join Date: Jan 2005

Posts: 295

gab00n

Default

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
gab00n is offline