cpp/numeric/ratio

The class template and associated templates provide compile-time rational arithmetic support. Each instantiation of this template exactly represents any finite rational number.

Compile-time fractions
Several convenience typedefs that correspond to the SI ratios are provided by the standard library:

Compile-time rational arithmetic
Several alias templates, that perform arithmetic operations on objects at compile-time are provided.

Compile-time rational comparison
Several class templates, that perform comparison operations on objects at compile-time are provided.