Lines Matching full:real
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
72 poly2.segment(1, poly.size()) -= 2 * real * poly;
73 poly2.tail(poly.size()) += (real*real + imag*imag) * poly;
85 // Run a test with the polynomial defined by the N real roots in roots_real.
86 // If use_real is false, NULL is passed as the real argument to
94 Vector real;
100 Vector* const real_ptr = use_real ? &real : NULL;
106 EXPECT_EQ(real.size(), N);
107 real = SortVector(real);
108 ExpectArraysClose(N, real.data(), real_roots, epsilon);
122 Vector real;
124 bool success = FindPolynomialRoots(poly, &real, &imag);
131 Vector real;
133 bool success = FindPolynomialRoots(poly, &real, &imag);
136 EXPECT_EQ(real.size(), 0);
171 Vector real;
176 bool success = FindPolynomialRoots(poly, &real, &imag);
179 EXPECT_EQ(real.size(), 2);
181 ExpectClose(real(0), 42.42, kEpsilon);
182 ExpectClose(real(1), 42.42, kEpsilon);