다음은 MSDN 발췌한건데 모두 double 을 표현 하는 방법입니다.
%e
Signed value having the form [ – ]d.dddd e [sign]ddd where d is a single decimal digit, dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or –.
%E
double Identical to the e format except that E rather than e introduces the exponent.
%f
double Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits. The number of digits before the decimal point depends on the magnitude of the number, and the number of digits after the decimal point depends on the requested precision.
%g
double Signed value printed in f or e format, whichever is more compact for the given value and precision. The e format is used only when the exponent of the value is less than –4 or greater than or equal to the precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
%G
double Identical to the g format, except that E, rather than e, introduces the exponent (where appropriate).
%e
Signed value having the form [ – ]d.dddd e [sign]ddd where d is a single decimal digit, dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or –.
%E
double Identical to the e format except that E rather than e introduces the exponent.
%f
double Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits. The number of digits before the decimal point depends on the magnitude of the number, and the number of digits after the decimal point depends on the requested precision.
%g
double Signed value printed in f or e format, whichever is more compact for the given value and precision. The e format is used only when the exponent of the value is less than –4 or greater than or equal to the precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
%G
double Identical to the g format, except that E, rather than e, introduces the exponent (where appropriate).
출처 : MSDN
'Computer_language > C++' 카테고리의 다른 글
C++ class에서 함수정의에 사용된 static [출처] C++ class에서 함수정의에 사용된 static|작성자 정천사 (0) | 2009.01.12 |
---|---|
Static Class 에 대한 정의 (0) | 2009.01.12 |
정적 중첩 클래스 (0) | 2009.01.12 |
각 상속 테스트 (0) | 2009.01.12 |
Ubuntu에서, c, c++관련 컴파일러 설치 [출처] Ubuntu에서, c, c++관련 컴파일러 설치|작성자 용이 (0) | 2009.01.12 |