17 #ifndef PAAL_FRACTION_HPP
18 #define PAAL_FRACTION_HPP
23 namespace data_structures {
56 template <
class A,
class B,
class C,
class D>
59 return f1.
num * f2.den < f2.num * f1.den;
74 template <
class A,
class B,
class C,
class D>
92 template <
class A,
class B,
class C,
class D>
110 template <
class A,
class B,
class C,
class D>
130 template<
class A,
class B,
class C,
class D,
class EPS = A>
148 template <
class A,
class B>
165 template<
class A,
class B,
class C>
174 #endif // PAAL_FRACTION_HPP
auto operator*(C c, const fraction< A, B > &f)
operator*
bool are_fractions_equal(const fraction< A, B > &f1, const fraction< C, D > &f2, EPS eps=A{})
operator==
bool operator>=(const fraction< A, B > &f1, const fraction< C, D > &f2)
operator>=
bool operator>(const fraction< A, B > &f1, const fraction< C, D > &f2)
operator>
fraction< A, B > make_fraction(A a, B b)
make function for fraction
B den_type
denominator type
Class for comparing floating point.
fraction(A num, B den)
constructor
simple class to represent fraction