4 #include "upoly_io.hpp"
5 #include <cln/integer_io.h>
12 template<typename T> static void
13 print(const T& p, ostream& os, const string& varname = string("x"))
18 bool seen_nonzero = false;
20 for (std::size_t i = p.size(); i-- != 0; ) {
24 os << "+ [WARNING: 0]*" << varname << "^" << i << "]";
28 os << "+ (" << p[i] << ")";
37 #define DEFINE_OPERATOR_OUT(type) \
38 std::ostream& operator<<(std::ostream& os, const type& p) \
43 void dbgprint(const type& p) \
45 print(p, std::cerr); \
48 DEFINE_OPERATOR_OUT(upoly);
49 DEFINE_OPERATOR_OUT(umodpoly);
50 #undef DEFINE_OPERATOR_OUT