Compile-time rational arithmetic
Compile-time rational arithmetic
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.
Compile-time fractions
Defined in header <ratio> |
|
---|---|
represents exact rational fraction (class template) |
Several convenience typedefs that correspond to the SI ratios are provided by the standard library:
Defined in header <ratio>
|
---|