A
adahili
Hi,
I use cout to print numbers in scientific notation. I noticed that a
number like 12.34 is sometimes (compiler-dependent) printed as 1.234e+1
or 1.234e+01 or 1.234e+001. Since I know the expected number of digits
for the exponent, I would like to control it. I can control the width
of the base part but not the exponent. Does anybody know how to set the
width of the exponent?
TIA.
Allen
I use cout to print numbers in scientific notation. I noticed that a
number like 12.34 is sometimes (compiler-dependent) printed as 1.234e+1
or 1.234e+01 or 1.234e+001. Since I know the expected number of digits
for the exponent, I would like to control it. I can control the width
of the base part but not the exponent. Does anybody know how to set the
width of the exponent?
TIA.
Allen