Rational Arithmetic
Utilities
Collaboration diagram for Rational Arithmetic:

## Files

file | ratio

## 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

## Detailed Description

Compile time representation of finite rational numbers.

## Typedef Documentation

## atto

using std::atto = typedef ratio< 1, 1000000000000000000>

Definition at line 618 of file ratio.

## centi

using std::centi = typedef ratio< 1, 100>

Definition at line 624 of file ratio.

## deca

using std::deca = typedef ratio< 10, 1>

Definition at line 626 of file ratio.

## deci

using std::deci = typedef ratio< 1, 10>

Definition at line 625 of file ratio.

## exa

using std::exa = typedef ratio< 1000000000000000000, 1>

Definition at line 633 of file ratio.

## femto

using std::femto = typedef ratio< 1, 1000000000000000>

Definition at line 619 of file ratio.

## giga

using std::giga = typedef ratio< 1000000000, 1>

Definition at line 630 of file ratio.

## hecto

using std::hecto = typedef ratio< 100, 1>

Definition at line 627 of file ratio.

## kilo

using std::kilo = typedef ratio< 1000, 1>

Definition at line 628 of file ratio.

## mega

using std::mega = typedef ratio< 1000000, 1>

Definition at line 629 of file ratio.

## micro

using std::micro = typedef ratio< 1, 1000000>

Definition at line 622 of file ratio.

## milli

using std::milli = typedef ratio< 1, 1000>

Definition at line 623 of file ratio.

## nano

using std::nano = typedef ratio< 1, 1000000000>

Definition at line 621 of file ratio.

## peta

using std::peta = typedef ratio< 1000000000000000, 1>

Definition at line 632 of file ratio.

## pico

using std::pico = typedef ratio< 1, 1000000000000>

Definition at line 620 of file ratio.

## ratio_add

template<typename _R1 , typename _R2 >

using std::ratio_add = typedef typename __ratio_add<_R1, _R2>::type

ratio_add

Definition at line 579 of file ratio.

## ratio_divide

template<typename _R1 , typename _R2 >

using std::ratio_divide = typedef typename __ratio_divide<_R1, _R2>::type

ratio_divide

Definition at line 390 of file ratio.

## ratio_multiply

template<typename _R1 , typename _R2 >

using std::ratio_multiply = typedef typename __ratio_multiply<_R1, _R2>::type

ratio_multiply

Definition at line 361 of file ratio.

## ratio_subtract

template<typename _R1 , typename _R2 >

using std::ratio_subtract = typedef typename __ratio_subtract<_R1, _R2>::type

ratio_subtract

Definition at line 606 of file ratio.

## tera

using std::tera = typedef ratio< 1000000000000, 1>

Definition at line 631 of file ratio.

## Variable Documentation

## ratio_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_equal_v

inline constexpr

Definition at line 470 of file ratio.

## ratio_greater_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_greater_equal_v

inline constexpr

Definition at line 481 of file ratio.

## ratio_greater_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_greater_v

inline constexpr

Definition at line 479 of file ratio.

## ratio_less_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_less_equal_v

inline constexpr

Definition at line 476 of file ratio.

## ratio_less_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_less_v

inline constexpr

Definition at line 474 of file ratio.

## ratio_not_equal_v

template<typename _R1 , typename _R2 >

constexpr bool std::ratio_not_equal_v

inline constexpr

Definition at line 472 of file ratio.