carl  24.04
Computer ARithmetic Library
term.tpp
Go to the documentation of this file.
1 namespace carl::vs {
2 
3 template<typename Poly>
4 bool Term<Poly>::operator==(const Term<Poly>& other) const {
5  return m_type == other.m_type && m_sqrt_ex == other.m_sqrt_ex;
6 }
7 
8 template<typename Poly>
9 std::ostream& operator<<(std::ostream& os, const Term<Poly>& s) {
10  if (s.is_normal()) {
11  os << s.sqrt_ex();
12  } else if (s.is_plus_eps()) {
13  os << s.sqrt_ex() << " + epsilon";
14  } else if (s.is_minus_infty()) {
15  os << "-infinity";
16  } else {
17  assert(s.is_plus_infty());
18  os << "+infinity";
19  }
20  return os;
21 }
22 
23 } // namespace carl::vs