floating point literal
Aus 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. |
<metanoindex/>
Fließkomma wörtliche definiert eine Kompilierung Konstante, deren Wert in der Quelldatei angegeben .
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.
Syntax
Ein Floating-Point-Literale haben zwei Syntax. Die erste besteht aus folgenden Teilen:
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.
- nichtleere Folge von Dezimalziffern mit einem Dezimalpunkt-Zeichen (definiert signifikant)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. - (optional)
eoderEfolgte mit optional Minus-oder Pluszeichen und nichtleere Folge von Dezimalziffern (definiert Exponent)Original:(optional)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. - (optional) ein Suffix Typspezifizierer als
l,f,LoderFOriginal:(optional) 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.
Die zweite besteht aus folgenden Teilen:
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.
- nichtleere Folge von Dezimalziffern (definiert signifikant)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. eoderEfolgte mit optional Minus-oder Pluszeichen und nichtleere Folge von Dezimalziffern (definiert Exponent)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.- (optional) ein Suffix Typspezifizierer als
l,f,LoderFOriginal:(optional) 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.
Das Suffix Typspezifizierer definiert die tatsächliche Art der Floating-Point-Literal:
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.
- (Kein Nachsetzzeichen) definiert
doubleOriginal:(no suffix) definesdoubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. f FdefiniertfloatOriginal:f FdefinesfloatThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.l Ldefiniertlong doubleOriginal:l Ldefineslong doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Erklärung
Eine Dezimalzahl wissenschaftliche Schreibweise verwendet wird, bedeutet, dass der Exponent der Potenz von 10, mit dem die Bedeutung ist multiplied.
ist
ist
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.
Die mathematische Bedeutung
123e4 ist 123 × 10 4 </ sup>Original:
The mathematical meaning of
123e4 is 123×104The 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.
Beispiel
std::cout << 123.456e-67 << '\n'
<< .1E4f << '\n'
<< 58. << '\n'
<< 4e2 << '\n';
Output:
1.23456e-65
1000
58
400