Namensräume
Varianten
Aktionen

floating point literal

Aus cppreference.com
< cpp‎ | language

 
 
Sprache C + +
Allgemeine Themen
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Flusskontrolle
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Bedingte Ausführung Aussagen
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterationsanweisungen
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Gehe Aussagen
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktion Erklärung
Lambda-Funktion Erklärung
Funktions-Template
inline-Spezifizierer
Exception-Spezifikationen (veraltet)
noexcept Spezifizierer (C++11)
Ausnahmen
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv Planer
Lagerdauer Planer
constexpr Spezifizierer (C++11)
auto Spezifizierer (C++11)
alignas Spezifizierer (C++11)
Initialisierung
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literale
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressions
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alternative Darstellungen
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
Typ Aliasdeklaration (C++11)
Attribute (C++11)
Wirft
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
impliziten Konvertierungen
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-Stil und funktionale Besetzung
Speicherzuweisung
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Class-spezifische Funktion Eigenschaften
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
explizit (C++11)
statisch
Besondere Member-Funktionen
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Templates
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Klassen-Template
Funktions-Template
Template-Spezialisierung
Parameter Packs (C++11)
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Inline Montage
 
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.

[Bearbeiten] 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.
  • 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) e oder E folgte mit optional Minus-oder Pluszeichen und nichtleere Folge von Dezimalziffern (definiert Exponent)
    Original:
    (optional) e or E followed 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, L oder F
    Original:
    (optional) a suffix type specifier as a l, f, L or F
    The 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.
  • 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.
  • e oder E folgte mit optional Minus-oder Pluszeichen und nichtleere Folge von Dezimalziffern (definiert Exponent)
    Original:
    e or E followed 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, L oder F
    Original:
    (optional) a suffix type specifier as a l, f, L or F
    The 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.
  • (Kein Nachsetzzeichen) definiert double
    Original:
    (no suffix) defines double
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • f F definiert float
    Original:
    f F defines float
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • l L definiert long double
    Original:
    l L defines long double
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Erklärung

Eine Dezimalzahl wissenschaftliche Schreibweise verwendet wird, bedeutet, dass der Exponent der Potenz von 10, mit dem die Bedeutung ist multiplied.
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.
Die mathematische Bedeutung 123e4 ist 123 × 10 4 </ sup>
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.
</div>

[Bearbeiten] Beispiel

std::cout << 123.456e-67 << '\n'
          << .1E4f       << '\n'
          << 58.         << '\n'
          << 4e2         << '\n';

Output:

1.23456e-65
1000
58
400