floating point literal
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
浮動小数点リテラルは、値がソースファイルで指定されたコンパイル時の定数を定義しています.
Original:
Floating point literal defines a compile-time constant whose value is specified in the source file.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 構文
浮動小数点リテラルは、2つの構文を持っています。最初のものは、次の部分から構成されます
Original:
A floating-point literals have two syntaxes. The first one consists of the following parts:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- 小数点文字(重要な定義)を含む小数桁数の空ではないシーケンスOriginal:nonempty sequence of decimal digits containing a decimal point character (defines significant)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - (オプション)
eまたはEマイナスオプションまたはプラス記号と小数点以下桁数の空でないシーケンス(定義指数)と続いたOriginal:(オプション)eorEfollowed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - (オプション)として接尾型指定子
l、f、LまたはFOriginal:(オプション) a suffix type specifier as al,f,LorFThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
もう一つは次の部分から構成されます
Original:
The second one consists of the following parts:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- 小数点以下桁数の空でないシーケンス(有意定義します)Original:nonempty sequence of decimal digits (defines significant)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
eまたはEマイナスオプションまたはプラス記号と小数点以下桁数の空でないシーケンス(定義指数)と続いたOriginal:eorEfollowed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - (オプション)として接尾型指定子
l、f、LまたはFOriginal:(オプション) a suffix type specifier as al,f,LorFThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
接尾辞型指定子は、浮動小数点リテラルの実際の型を定義します:
Original:
The suffix type specifier defines the actual type of the floating-point literal:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- (サフィックスなし)double定義していますOriginal:(no suffix) defines doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
f Ffloatを定義しますOriginal:f Fdefines floatThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
l Llong doubleを定義しますOriginal:l Ldefines long doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
[編集] 説明
進科学的表記法は、指数が有意にmultiplied.
あるが10の力であることを意味し、使用されています
あるが10の力であることを意味し、使用されています
Original:
A decimal scientific notation is used, meaning that the exponent is the power of 10 by which the significant is multiplied.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
123e4の数学的な意味は 123×10 4 </ sup>の</div>
Original:
The mathematical meaning of 123e4 is 123×104
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例
std::cout << 123.456e-67 << '\n' << .1E4f << '\n' << 58. << '\n' << 4e2 << '\n';
Output:
1.23456e-65 1000 58 400