Lines Matching full:ratio
2 //===---------------------------- ratio -----------------------------------===//
15 ratio synopsis
21 class ratio
26 typedef ratio<num, den> type;
29 // ratio arithmetic
35 // ratio comparison
44 typedef ratio<1, 1000000000000000000000000> yocto; // not supported
45 typedef ratio<1, 1000000000000000000000> zepto; // not supported
46 typedef ratio<1, 1000000000000000000> atto;
47 typedef ratio<1, 1000000000000000> femto;
48 typedef ratio<1, 1000000000000> pico;
49 typedef ratio<1, 1000000000> nano;
50 typedef ratio<1, 1000000> micro;
51 typedef ratio<1, 1000> milli;
52 typedef ratio<1, 100> centi;
53 typedef ratio<1, 10> deci;
54 typedef ratio< 10, 1> deca;
55 typedef ratio< 100, 1> hecto;
56 typedef ratio< 1000, 1> kilo;
57 typedef ratio< 1000000, 1> mega;
58 typedef ratio< 1000000000, 1> giga;
59 typedef ratio< 1000000000000, 1> tera;
60 typedef ratio< 1000000000000000, 1> peta;
61 typedef ratio< 1000000000000000000, 1> exa;
62 typedef ratio< 1000000000000000000000, 1> zetta; // not supported
63 typedef ratio<1000000000000000000000000, 1> yotta; // not supported
65 // 20.11.5, ratio comparison
249 class _LIBCPP_TEMPLATE_VIS ratio
251 static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
252 static_assert(_Den != 0, "ratio divide by 0");
253 static_assert(__static_abs<_Den>::value > 0, "ratio denominator is out of range");
262 typedef ratio<num, den> type;
266 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
269 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
272 template <intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den> > : true_type {};
274 typedef ratio<1LL, 1000000000000000000LL> atto;
275 typedef ratio<1LL, 1000000000000000LL> femto;
276 typedef ratio<1LL, 1000000000000LL> pico;
277 typedef ratio<1LL, 1000000000LL> nano;
278 typedef ratio<1LL, 1000000LL> micro;
279 typedef ratio<1LL, 1000LL> milli;
280 typedef ratio<1LL, 100LL> centi;
281 typedef ratio<1LL, 10LL> deci;
282 typedef ratio< 10LL, 1LL> deca;
283 typedef ratio< 100LL, 1LL> hecto;
284 typedef ratio< 1000LL, 1LL> kilo;
285 typedef ratio< 1000000LL, 1LL> mega;
286 typedef ratio< 1000000000LL, 1LL> giga;
287 typedef ratio< 1000000000000LL, 1LL> tera;
288 typedef ratio< 1000000000000000LL, 1LL> peta;
289 typedef ratio<1000000000000000000LL, 1LL> exa;
298 typedef typename ratio
325 typedef typename ratio
354 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
355 ratio
389 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
390 ratio
457 static const bool value = __ratio_less1<ratio<_R1::den, _M1>,
458 ratio<_R2::den, _M2>, !_Odd>::value;
477 static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::value;
499 typedef ratio<__static_gcd<_R1::num, _R2::num>::value,