Home | History | Annotate | Download | only in Intersection

Lines Matching defs: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]) {
85 return quadraticRootsReal(t2, t1, t0, roots);
88 return cubicRootsReal(t3, t2, t1, t0, roots);
95 int num = cubicRootsReal(t4, t3, t2, t1, roots);
97 if (approximately_zero(roots[i])) {
101 roots[num++] = 0;
106 int num = cubicRootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); // note that -C==A+B+D+E
108 if (approximately_equal(roots[i], 1)) {
112 roots[num++] = 1;
141 int roots = cubicRootsReal(1, -p / 2, -r, r * p / 2 - q * q / 8, cubicRoots);
146 for (index = 0; index < roots; ++index) {
176 for (index = 0; index < roots; ++index) {
188 for (index = firstCubicRoot; index < roots; ++index) {
210 break; // prefer solutions without single quad roots