Truncate doubles

is there a way to shorten the display of doubles to a specific number of digits after the decimal, say… 6?

yes … but in which context? (see for example the printf and std::ostream documentation).