libstdc++: Rational Arithmetic (original) (raw)

Classes
struct std::ratio< _Num, _Den >
struct std::ratio_equal< _R1, _R2 >
struct std::ratio_greater< _R1, _R2 >
struct std::ratio_greater_equal< _R1, _R2 >
struct std::ratio_less< _R1, _R2 >
struct std::ratio_less_equal< _R1, _R2 >
struct std::ratio_not_equal< _R1, _R2 >
Typedefs
using std::atto = ratio< 1, 1000000000000000000 >
using std::centi = ratio< 1, 100 >
using std::deca = ratio< 10, 1 >
using std::deci = ratio< 1, 10 >
using std::exa = ratio< 1000000000000000000, 1 >
using std::femto = ratio< 1, 1000000000000000 >
using std::giga = ratio< 1000000000, 1 >
using std::hecto = ratio< 100, 1 >
using std::kilo = ratio< 1000, 1 >
using std::mega = ratio< 1000000, 1 >
using std::micro = ratio< 1, 1000000 >
using std::milli = ratio< 1, 1000 >
using std::nano = ratio< 1, 1000000000 >
using std::peta = ratio< 1000000000000000, 1 >
using std::pico = ratio< 1, 1000000000000 >
template<typename _R1 , typename _R2 >
using std::ratio_add = typename __ratio_add< _R1, _R2 >::type
template<typename _R1 , typename _R2 >
using std::ratio_divide = typename __ratio_divide< _R1, _R2 >::type
template<typename _R1 , typename _R2 >
using std::ratio_multiply = typename __ratio_multiply< _R1, _R2 >::type
template<typename _R1 , typename _R2 >
using std::ratio_subtract = typename __ratio_subtract< _R1, _R2 >::type
using std::tera = ratio< 1000000000000, 1 >
Variables
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_equal_v
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_greater_equal_v
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_greater_v
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_less_equal_v
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_less_v
template<typename _R1 , typename _R2 >
constexpr bool std::ratio_not_equal_v

Compile time representation of finite rational numbers.

atto

centi

deca

deci

exa

femto

giga

hecto

kilo

mega

micro

milli

nano

peta

pico

ratio_add

template<typename _R1 , typename _R2 >

ratio_add

Definition at line 579 of file ratio.

ratio_divide

template<typename _R1 , typename _R2 >

ratio_divide

Definition at line 390 of file ratio.

ratio_multiply

template<typename _R1 , typename _R2 >

ratio_multiply

Definition at line 361 of file ratio.

ratio_subtract

template<typename _R1 , typename _R2 >

ratio_subtract

Definition at line 606 of file ratio.

tera

ratio_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_equal_v inlineconstexpr

Definition at line 470 of file ratio.

ratio_greater_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_greater_equal_v inlineconstexpr

Definition at line 481 of file ratio.

ratio_greater_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_greater_v inlineconstexpr

Definition at line 479 of file ratio.

ratio_less_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_less_equal_v inlineconstexpr

Definition at line 476 of file ratio.

ratio_less_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_less_v inlineconstexpr

Definition at line 474 of file ratio.

ratio_not_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_not_equal_v inlineconstexpr

Definition at line 472 of file ratio.