Lines Matching refs:ratio
2 //===---------------------------- ratio -----------------------------------===//
14 ratio synopsis
20 class ratio
25 typedef ratio<num, den> type;
28 // ratio arithmetic
34 // ratio comparison
43 typedef ratio<1, 1000000000000000000000000> yocto; // not supported
44 typedef ratio<1, 1000000000000000000000> zepto; // not supported
45 typedef ratio<1, 1000000000000000000> atto;
46 typedef ratio<1, 1000000000000000> femto;
47 typedef ratio<1, 1000000000000> pico;
48 typedef ratio<1, 1000000000> nano;
49 typedef ratio<1, 1000000> micro;
50 typedef ratio<1, 1000> milli;
51 typedef ratio<1, 100> centi;
52 typedef ratio<1, 10> deci;
53 typedef ratio< 10, 1> deca;
54 typedef ratio< 100, 1> hecto;
55 typedef ratio< 1000, 1> kilo;
56 typedef ratio< 1000000, 1> mega;
57 typedef ratio< 1000000000, 1> giga;
58 typedef ratio< 1000000000000, 1> tera;
59 typedef ratio< 1000000000000000, 1> peta;
60 typedef ratio< 1000000000000000000, 1> exa;
61 typedef ratio< 1000000000000000000000, 1> zetta; // not supported
62 typedef ratio<1000000000000000000000000, 1> yotta; // not supported
64 // 20.11.5, ratio comparison
248 class _LIBCPP_TEMPLATE_VIS ratio
250 static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
251 static_assert(_Den != 0, "ratio divide by 0");
252 static_assert(__static_abs<_Den>::value > 0, "ratio denominator is out of range");
261 typedef ratio<num, den> type;
265 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
268 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
271 template <intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den> > : true_type {};
273 typedef ratio<1LL, 1000000000000000000LL> atto;
274 typedef ratio<1LL, 1000000000000000LL> femto;
275 typedef ratio<1LL, 1000000000000LL> pico;
276 typedef ratio<1LL, 1000000000LL> nano;
277 typedef ratio<1LL, 1000000LL> micro;
278 typedef ratio<1LL, 1000LL> milli;
279 typedef ratio<1LL, 100LL> centi;
280 typedef ratio<1LL, 10LL> deci;
281 typedef ratio< 10LL, 1LL> deca;
282 typedef ratio< 100LL, 1LL> hecto;
283 typedef ratio< 1000LL, 1LL> kilo;
284 typedef ratio< 1000000LL, 1LL> mega;
285 typedef ratio< 1000000000LL, 1LL> giga;
286 typedef ratio< 1000000000000LL, 1LL> tera;
287 typedef ratio< 1000000000000000LL, 1LL> peta;
288 typedef ratio<1000000000000000000LL, 1LL> exa;
297 typedef typename ratio
324 typedef typename ratio
353 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
354 ratio
388 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
389 ratio
456 static const bool value = __ratio_less1<ratio<_R1::den, _M1>,
457 ratio<_R2::den, _M2>, !_Odd>::value;
476 …static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::…
498 typedef ratio<__static_gcd<_R1::num, _R2::num>::value,