Lines Matching defs:imag
66 // p(x) = poly(x) * (x - real - imag*i) * (x - real + imag*i).
67 Vector AddComplexRootPair(const Vector& poly, double real, double imag) {
70 // Multiply poly by x^2 - 2real + abs(real,imag)^2
73 poly2.tail(poly.size()) += (real*real + imag*imag) * poly;
123 Vector imag;
124 bool success = FindPolynomialRoots(poly, &real, &imag);
132 Vector imag;
133 bool success = FindPolynomialRoots(poly, &real, &imag);
137 EXPECT_EQ(imag.size(), 0);
172 Vector imag;
176 bool success = FindPolynomialRoots(poly, &real, &imag);
180 EXPECT_EQ(imag.size(), 2);
183 ExpectClose(std::abs(imag(0)), 4.2, kEpsilon);
184 ExpectClose(std::abs(imag(1)), 4.2, kEpsilon);
185 ExpectClose(std::abs(imag(0) + imag(1)), 0.0, kEpsilon);