• Home
  • Raw
  • Download

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
247 class _LIBCPP_TEMPLATE_VIS ratio
249 static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
250 static_assert(_Den != 0, "ratio divide by 0");
251 static_assert(__static_abs<_Den>::value > 0, "ratio denominator is out of range");
260 typedef ratio<num, den> type;
264 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
267 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
270 template <intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den> > : true_type {};
272 typedef ratio<1LL, 1000000000000000000LL> atto;
273 typedef ratio<1LL, 1000000000000000LL> femto;
274 typedef ratio<1LL, 1000000000000LL> pico;
275 typedef ratio<1LL, 1000000000LL> nano;
276 typedef ratio<1LL, 1000000LL> micro;
277 typedef ratio<1LL, 1000LL> milli;
278 typedef ratio<1LL, 100LL> centi;
279 typedef ratio<1LL, 10LL> deci;
280 typedef ratio< 10LL, 1LL> deca;
281 typedef ratio< 100LL, 1LL> hecto;
282 typedef ratio< 1000LL, 1LL> kilo;
283 typedef ratio< 1000000LL, 1LL> mega;
284 typedef ratio< 1000000000LL, 1LL> giga;
285 typedef ratio< 1000000000000LL, 1LL> tera;
286 typedef ratio< 1000000000000000LL, 1LL> peta;
287 typedef ratio<1000000000000000000LL, 1LL> exa;
296 typedef typename ratio
323 typedef typename ratio
352 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
353 ratio
387 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
388 ratio
455 static const bool value = __ratio_less1<ratio<_R1::den, _M1>,
456 ratio<_R2::den, _M2>, !_Odd>::value;
475 …static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::…
497 typedef ratio<__static_gcd<_R1::num, _R2::num>::value,