std::ratio

< cpp‎ | numeric‎ | ratio

Numéricos biblioteca
 Funciones matemáticas comunes Floating-point medio ambiente Los números complejos Matrices numéricas Pseudo-aleatoria de generación de números En tiempo de compilación aritmética racional (C++11) Genéricos operaciones 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 adjacent_difference partial_sum

Compilar aritmética tiempo racional
 ratio(C++11) AritméticaOriginal: ArithmeticThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. ratio_add(C++11) ratio_subtract(C++11) ratio_multiply(C++11) ratio_divide(C++11) ComparaciónOriginal: ComparisonThe 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 en la cabecera template<     std::intmax_t Num,     std::intmax_t Denom = 1 > class ratio; (desde 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 Varios de conveniencia que corresponden a las proporciones de la IS son proporcionados por la biblioteca estándar:
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.