# Compile-time rational arithmetic

< cpp‎ | numeric

C++
 Sprache Concepts Utilities-Bibliothek Strings Bibliothek Container-Bibliothek Algorithmen-Bibliothek Iteratoren Bibliothek Numerik-Bibliothek Input / Output-Bibliothek Lokalisierungen Bibliothek Reguläre Ausdrücke Bibliothek (C++11) Atomare Operationen Bibliothek (C++11) Thread Support-Bibliothek (C++11)

Numerik-Bibliothek
Gemeinsame mathematischen Funktionen
Floating-Point-Umgebung
Komplexe Zahlen
Numerische Arrays
Pseudo-Zufallszahlen
Compile-time rationale Arithmetik (C++11)
Generische numerische Operationen
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 iota (C++11)
 accumulate
 inner_product
 partial_sum

Compile-Zeit rationale Arithmetik
 ratio (C++11)
Arithmetik
Original:
Arithmetic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 ratio_subtract (C++11)
 ratio_multiply (C++11)
 ratio_divide (C++11)
Vergleich
Original:
Comparison
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 ratio_equal (C++11)
 ratio_not_equal (C++11)
 ratio_less (C++11)
 ratio_less_equal (C++11)
 ratio_greater (C++11)
 ratio_greater_equal (C++11)

Das Klassen-Template `std::ratio` und zugehörigen Vorlagen bieten Kompilierung rationale Arithmetik-Unterstützung. Jede Instanziierung dieser Vorlage genau eine beliebige endliche rationale Zahl .
Original:
The class template `std::ratio` and associated templates provide compile-time rational arithmetic support. Each instantiation of this template exactly represents any finite rational number.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

### [Bearbeiten]Compile-time Fraktionen

 Defined in header `` ratio stellt exakte rationale FraktionOriginal: represents exact rational fractionThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)
Mehrere Convenience typedefs, die auf die SI-Verhältnisse entsprechen, werden von der Standard-Bibliothek zur Verfügung:
Original:
Several convenience typedefs that correspond to the SI ratios are provided by the standard library:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` Type Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. Definition `yocto` std::ratio<1, 1000000000000000000000000>, wenn std::intmax_t können den Nenner darstellenOriginal: std::ratio<1, 1000000000000000000000000>, if std::intmax_t can represent the denominatorThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. `zepto` std::ratio<1, 1000000000000000000000>, wenn std::intmax_t können den Nenner darstellenOriginal: std::ratio<1, 1000000000000000000000>, if std::intmax_t can represent the denominatorThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. `atto` std::ratio<1, 1000000000000000000> `femto` std::ratio<1, 1000000000000000> `pico` std::ratio<1, 1000000000000> `nano` std::ratio<1, 1000000000> `micro` std::ratio<1, 1000000> `milli` std::ratio<1, 1000> `centi` std::ratio<1, 100> `deci` std::ratio<1, 10> `deca` std::ratio<10, 1> `hecto` std::ratio<100, 1> `kilo` std::ratio<1000, 1> `mega` std::ratio<1000000, 1> `giga` std::ratio<1000000000, 1> `tera` std::ratio<1000000000000, 1> `peta` std::ratio<1000000000000000, 1> `exa` std::ratio<1000000000000000000, 1> `zetta` std::ratio<1000000000000000000000, 1>, wenn std::intmax_t können den Zähler darstellenOriginal: std::ratio<1000000000000000000000, 1>, if std::intmax_t can represent the numeratorThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. `yotta` std::ratio<1000000000000000000000000, 1>, wenn std::intmax_t können den Zähler darstellenOriginal: std::ratio<1000000000000000000000000, 1>, if std::intmax_t can represent the numeratorThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

### [Bearbeiten]Compile-time rationale Arithmetik

Mehrere Klassen-Templates, die arithmetische Operationen auf `ratio` Objekten zur Compile-Zeit zur Verfügung .
Original:
Several class templates, that perform arithmetic operations on `ratio` objects at compile-time are provided.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` ratio_add(C++11) fügt zwei `ratio` Objekten bei der Kompilierung Original: adds two `ratio` objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_subtract(C++11) subtrahiert zwei `ratio` Objekten bei der Kompilierung Original: subtracts two `ratio` objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_multiply(C++11) multipliziert zwei `ratio` Objekten bei der Kompilierung Original: multiplies two `ratio` objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_divide(C++11) dividiert zwei `ratio` Objekten bei der Kompilierung Original: divides two `ratio` objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template) 

### [Bearbeiten]Compile-time rationale Vergleich

Mehrere Klassen-Templates, die einen Vergleich Operationen auf `ratio` Objekten zur Compile-Zeit zur Verfügung .
Original:
Several class templates, that perform comparison operations on `ratio` objects at compile-time are provided.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` ratio_equal(C++11) vergleicht zwei `ratio` Objekte auf Gleichheit bei der Kompilierung Original: compares two `ratio` objects for equality at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_not_equal(C++11) vergleicht zwei `ratio` Objekte auf Ungleichheit bei der Kompilierung Original: compares two `ratio` objects for inequality at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_less(C++11) vergleicht zwei `ratio` Objekte für weniger als bei der Kompilierung Original: compares two `ratio` objects for less than at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_less_equal(C++11) compares two `ratio` objects for less than or equal to at compile-time (Klassen-Template)  ratio_greater(C++11) vergleicht zwei `ratio` Objekte für größer bei der Kompilierung Original: compares two `ratio` objects for greater than at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)  ratio_greater_equal(C++11) vergleicht zwei `ratio` Objekte für größer oder gleich bei der Kompilierung Original: compares two `ratio` objects for greater than or equal to at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klassen-Template)