Lines Matching full:ratio

14     ratio synopsis
20 class ratio
25 typedef ratio<num, den> type;
28 // ratio arithmetic
34 // ratio comparison
43 using quecto = ratio <1, 1'000'000'000'000'000'000'000'000'000'000>; // Since C++26; not supported
44 using ronto = ratio <1, 1'000'000'000'000'000'000'000'000'000>; // Since C++26; not supported
45 typedef ratio<1, 1000000000000000000000000> yocto; // not supported
46 typedef ratio<1, 1000000000000000000000> zepto; // not supported
47 typedef ratio<1, 1000000000000000000> atto;
48 typedef ratio<1, 1000000000000000> femto;
49 typedef ratio<1, 1000000000000> pico;
50 typedef ratio<1, 1000000000> nano;
51 typedef ratio<1, 1000000> micro;
52 typedef ratio<1, 1000> milli;
53 typedef ratio<1, 100> centi;
54 typedef ratio<1, 10> deci;
55 typedef ratio< 10, 1> deca;
56 typedef ratio< 100, 1> hecto;
57 typedef ratio< 1000, 1> kilo;
58 typedef ratio< 1000000, 1> mega;
59 typedef ratio< 1000000000, 1> giga;
60 typedef ratio< 1000000000000, 1> tera;
61 typedef ratio< 1000000000000000, 1> peta;
62 typedef ratio< 1000000000000000000, 1> exa;
63 typedef ratio< 1000000000000000000000, 1> zetta; // not supported
64 typedef ratio<1000000000000000000000000, 1> yotta; // not supported
65 using ronna = ratio <1'000'000'000'000'000'000'000'000'000, 1>; // Since C++26; not supported
66 using quetta = ratio <1'000'000'000'000'000'000'000'000'000'000, 1>; // Since C++26; not supported
68 // 20.11.5, ratio comparison
241 class _LIBCPP_TEMPLATE_VIS ratio {
242 static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
243 static_assert(_Den != 0, "ratio divide by 0");
244 static_assert(__static_abs<_Den>::value > 0, "ratio denominator is out of range");
254 typedef ratio<num, den> type;
258 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
261 _LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
266 struct __is_ratio<ratio<_Num, _Den> > : true_type {};
268 typedef ratio<1LL, 1000000000000000000LL> atto;
269 typedef ratio<1LL, 1000000000000000LL> femto;
270 typedef ratio<1LL, 1000000000000LL> pico;
271 typedef ratio<1LL, 1000000000LL> nano;
272 typedef ratio<1LL, 1000000LL> micro;
273 typedef ratio<1LL, 1000LL> milli;
274 typedef ratio<1LL, 100LL> centi;
275 typedef ratio<1LL, 10LL> deci;
276 typedef ratio< 10LL, 1LL> deca;
277 typedef ratio< 100LL, 1LL> hecto;
278 typedef ratio< 1000LL, 1LL> kilo;
279 typedef ratio< 1000000LL, 1LL> mega;
280 typedef ratio< 1000000000LL, 1LL> giga;
281 typedef ratio< 1000000000000LL, 1LL> tera;
282 typedef ratio< 1000000000000000LL, 1LL> peta;
283 typedef ratio<1000000000000000000LL, 1LL> exa;
291 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
292 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
295 typedef typename ratio< __ll_mul<_R1::num / __gcd_n1_d2, _R2::num / __gcd_d1_n2>::value,
317 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
318 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
321 typedef typename ratio< __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
343 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
344 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
348 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
349 ratio< __ll_add< __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
372 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
373 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
377 ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
378 ratio< __ll_sub< __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
399 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
400 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
405 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
406 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
439 static const bool value = __ratio_less1<ratio<_R1::den, _M1>, ratio<_R2::den, _M2>, !_Odd>::value;
457 …static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::…
462 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
463 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
468 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
469 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
474 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
475 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
480 …static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialisation of the…
481 …static_assert(__is_ratio<_R2>::value, "[ratio.general]/2 requires R2 to be a specialisation of the…
486 …typedef ratio<__static_gcd<_R1::num, _R2::num>::value, __static_lcm<_R1::den, _R2::den>::value> ty…