Espaces de noms
Variantes
Affichages
Actions

std::ratio

De cppreference.com
< cpp‎ | numeric‎ | ratio

 
 
Bibliothèque Numerics
Fonctions mathématiques courantes
Virgule flottante environnement
Nombres complexes
Tableaux numériques
La génération de nombres pseudo-aléatoires
Moment de la compilation arithmétique rationnelle (C++11)
Génériques des opérations numériques
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
 
Compiler arithmétique rationnelle du temps
ratio (C++11)
Arithmétique
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_add (C++11)
ratio_subtract (C++11)
ratio_multiply (C++11)
ratio_divide (C++11)
Comparaison
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)
 
Defined in header <ratio>
template<

    std::intmax_t Num,
    std::intmax_t Denom = 1

> class ratio;
(depuis 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.

Plusieurs dépanneurs typedefs qui correspondent aux ratios SI sont fournies par la bibliothèque standard:
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 <ratio>
Type d'
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>, si std::intmax_t peut représenter le dénominateur
Original:
std::ratio<1, 1000000000000000000000000>, if std::intmax_t can represent the denominator
The 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>, si std::intmax_t peut représenter le dénominateur
Original:
std::ratio<1, 1000000000000000000000>, if std::intmax_t can represent the denominator
The 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>, si std::intmax_t peut représenter le numérateur
Original:
std::ratio<1000000000000000000000, 1>, if std::intmax_t can represent the numerator
The 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>, si std::intmax_t peut représenter le numérateur
Original:
std::ratio<1000000000000000000000000, 1>, if std::intmax_t can represent the numerator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Types de membres

Type du membre Définition
type std::ratio<num, den>

[modifier] Objets membres

constexpr intmax_t num
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
constexpr valeur de type std::intmax_t égale à sign(Num) * sign(Denom) * abs(Num) / gcd(Num, Denom)
Original:
constexpr value of type std::intmax_t equal to sign(Num) * sign(Denom) * abs(Num) / gcd(Num, Denom)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)
constexpr intmax_t den
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
constexpr valeur de type std::intmax_t égale à abs(Denom) / gcd(Num, Denom)
Original:
constexpr value of type std::intmax_t equal to abs(Denom) / gcd(Num, Denom)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)