std::ratio

< cpp‎ | numeric‎ | ratio

C++
 Linguagem Conceitos Biblioteca de utilitários Biblioteca cordas Recipientes biblioteca Biblioteca algoritmos Biblioteca iteradores Biblioteca numéricos De entrada / saída da biblioteca Biblioteca localizações Biblioteca de expressões regulares (C++11) Biblioteca operações atômica (C++11) Biblioteca de suporte a discussão (C++11)

Biblioteca numéricos
Funções matemáticas comuns
De ponto flutuante ambiente
Números complexos
Matrizes numéricas
Pseudo-aleatório de geração de números
Tempo de compilação aritmética racional (C++11)
Genéricos operações numéricas
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

Compilar hora aritmética racional
 ratio (C++11)
Aritmética
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)
Comparação
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)

 Definido no cabeçalho template<     std::intmax_t Num,     std::intmax_t Denom = 1 > class ratio; (a partir do C++ 11)

The class template std::ratio provides compile-time rational arithmetic support. Each instantiation of this template exactly represents any finite rational number as long as its numerator Num and denominator Denom are representable as compile-time constants of type std::intmax_t. In addition, Denom may not be zero and may not be equal to the most negative value. Both numerator and denominator are automatically reduced to the lowest terms.

Typedefs conveniência vários que correspondem aos índices de SI são fornecidos pela biblioteca padrão:
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.