Lines Matching refs:_R2
273 template <class _R1, class _R2>
277 static const intmax_t __gcd_n1_d2 = __static_gcd<_R1::num, _R2::den>::value;
278 static const intmax_t __gcd_d1_n2 = __static_gcd<_R1::den, _R2::num>::value;
282 __ll_mul<_R1::num / __gcd_n1_d2, _R2::num / __gcd_d1_n2>::value,
283 __ll_mul<_R2::den / __gcd_n1_d2, _R1::den / __gcd_d1_n2>::value
289 template <class _R1, class _R2> using ratio_multiply
290 = typename __ratio_multiply<_R1, _R2>::type;
294 template <class _R1, class _R2>
296 : public __ratio_multiply<_R1, _R2>::type {};
300 template <class _R1, class _R2>
304 static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
305 static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
309 __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
310 __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
316 template <class _R1, class _R2> using ratio_divide
317 = typename __ratio_divide<_R1, _R2>::type;
321 template <class _R1, class _R2>
323 : public __ratio_divide<_R1, _R2>::type {};
327 template <class _R1, class _R2>
331 static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
332 static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
341 __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
342 __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
344 _R2::den
351 template <class _R1, class _R2> using ratio_add
352 = typename __ratio_add<_R1, _R2>::type;
356 template <class _R1, class _R2>
358 : public __ratio_add<_R1, _R2>::type {};
362 template <class _R1, class _R2>
366 static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
367 static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
376 __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
377 __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
379 _R2::den
386 template <class _R1, class _R2> using ratio_subtract
387 = typename __ratio_subtract<_R1, _R2>::type;
391 template <class _R1, class _R2>
393 : public __ratio_subtract<_R1, _R2>::type {};
399 template <class _R1, class _R2>
401 : public integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> {};
403 template <class _R1, class _R2>
405 : public integral_constant<bool, !ratio_equal<_R1, _R2>::value> {};
409 template <class _R1, class _R2, bool _Odd = false,
411 intmax_t _Q2 = _R2::num / _R2::den, intmax_t _M2 = _R2::num % _R2::den>
417 template <class _R1, class _R2, bool _Odd, intmax_t _Qp>
418 struct __ratio_less1<_R1, _R2, _Odd, _Qp, 0, _Qp, 0>
423 template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M2>
424 struct __ratio_less1<_R1, _R2, _Odd, _Qp, 0, _Qp, _M2>
429 template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M1>
430 struct __ratio_less1<_R1, _R2, _Odd, _Qp, _M1, _Qp, 0>
435 template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M1,
437 struct __ratio_less1<_R1, _R2, _Odd, _Qp, _M1, _Qp, _M2>
440 ratio<_R2::den, _M2>, !_Odd>::value;
443 template <class _R1, class _R2, intmax_t _S1 = __static_sign<_R1::num>::value,
444 intmax_t _S2 = __static_sign<_R2::num>::value>
450 template <class _R1, class _R2>
451 struct __ratio_less<_R1, _R2, 1LL, 1LL>
453 static const bool value = __ratio_less1<_R1, _R2>::value;
456 template <class _R1, class _R2>
457 struct __ratio_less<_R1, _R2, -1LL, -1LL>
459 …static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::…
462 template <class _R1, class _R2>
464 : public integral_constant<bool, __ratio_less<_R1, _R2>::value> {};
466 template <class _R1, class _R2>
468 : public integral_constant<bool, !ratio_less<_R2, _R1>::value> {};
470 template <class _R1, class _R2>
472 : public integral_constant<bool, ratio_less<_R2, _R1>::value> {};
474 template <class _R1, class _R2>
476 : public integral_constant<bool, !ratio_less<_R1, _R2>::value> {};
478 template <class _R1, class _R2>
481 typedef ratio<__static_gcd<_R1::num, _R2::num>::value,
482 __static_lcm<_R1::den, _R2::den>::value> type;