Lines Matching full:roots
5 * Utility functions to find cubic and quartic roots,
10 * The functions return the number of non-complex roots and
24 * correct but multiple roots might be reported more
34 const double t0, const bool oneHint, double roots[4]) { in reducedQuarticRoots()
85 return quadraticRootsReal(t2, t1, t0, roots); in reducedQuarticRoots()
88 return cubicRootsReal(t3, t2, t1, t0, roots); in reducedQuarticRoots()
95 int num = cubicRootsReal(t4, t3, t2, t1, roots); in reducedQuarticRoots()
97 if (approximately_zero(roots[i])) { in reducedQuarticRoots()
101 roots[num++] = 0; in reducedQuarticRoots()
106 int num = cubicRootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); // note that -C==A+B+D+E in reducedQuarticRoots()
108 if (approximately_equal(roots[i], 1)) { in reducedQuarticRoots()
112 roots[num++] = 1; in reducedQuarticRoots()
141 int roots = cubicRootsReal(1, -p / 2, -r, r * p / 2 - q * q / 8, cubicRoots); in quarticRootsReal() local
146 for (index = 0; index < roots; ++index) { in quarticRootsReal()
176 for (index = 0; index < roots; ++index) { in quarticRootsReal()
188 for (index = firstCubicRoot; index < roots; ++index) { in quarticRootsReal()
210 break; // prefer solutions without single quad roots in quarticRootsReal()