#include #include using namespace std; std::ostream & operator<< (std::ostream &output, const std::complex op) { if (op == 0.0) output << "0"; else if (op.imag() > 0) if (op.real () != 0.0) output << op.real () << "+" << op.imag() << "i"; else output << op.imag() << "i"; else if (op.imag() == 0) output << op.real (); else if (op.real () != 0.0) output << op.real () << op.imag() << "i"; else output << op.imag() << "i"; return output; } int main(int argc, char const *argv[]) { mpfr_set_default_prec (162); double testCoefs[] = {0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, -128.000000000000, -128.000000000000, -96.0000000000000, -96.0000000000000, 0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, 72.0000000000000, 72.0000000000000, 304.000000000000, 304.000000000000, 12.0000000000000, 12.0000000000000, 180.000000000000, 180.000000000000, 0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, 90.0000000000000, 90.0000000000000, -182.500000000000, -182.500000000000, 133.500000000000, 133.500000000000, -190.500000000000, -190.500000000000, 42.0000000000000, 42.0000000000000, -44.0000000000000, -44.0000000000000, 0.000000000000000, -0.000000000000000, 0.000000000000000, -0.000000000000000, -40.2500000000000, -40.2500000000000, 18.2500000000000, 18.2500000000000, -72.0000000000000, -72.0000000000000, 21.0000000000000, 21.0000000000000, -38.5000000000000, -38.5000000000000, 5.50000000000000, 5.50000000000000, -6.00000000000000, -6.00000000000000, -0.000000000000000, 0.000000000000000}; double y0R = 4.0; double y0I = -4.0; double *rop = homotopyPath (4, testCoefs, y0R, y0I); int len = (int) rop[0]; int i; for (i=0; i