Lines Matching full:roots
28 "Invalid test case, up to 2 roots allowed"); in testQuadRootsReal()
39 "Invalid test case root %zu. Roots should be sorted in ascending order", i); in testQuadRootsReal()
45 double roots[2] = {0, 0}; in testQuadRootsReal() local
46 int rootCount = SkDQuad::RootsReal(A, B, C, roots); in testQuadRootsReal()
48 "Wrong number of roots returned %zu != %d", expectedRoots.size(), in testQuadRootsReal()
51 // We don't care which order the roots are returned from the algorithm. in testQuadRootsReal()
53 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testQuadRootsReal()
56 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testQuadRootsReal()
57 "0 != %.16f at index %d", roots[i], i); in testQuadRootsReal()
60 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testQuadRootsReal()
61 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testQuadRootsReal()
67 double roots[2] = {0, 0}; in testQuadRootsReal() local
68 int rootCount = SkQuads::RootsReal(A, B, C, roots); in testQuadRootsReal()
70 "Wrong number of roots returned %zu != %d", expectedRoots.size(), in testQuadRootsReal()
73 // We don't care which order the roots are returned from the algorithm. in testQuadRootsReal()
75 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testQuadRootsReal()
78 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testQuadRootsReal()
79 "0 != %.16f at index %d", roots[i], i); in testQuadRootsReal()
82 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testQuadRootsReal()
83 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testQuadRootsReal()
92 testQuadRootsReal(reporter, "two roots 3x^2 - 20x - 40", in DEF_TEST()
101 testQuadRootsReal(reporter, "two roots 2x^2 + 30x - 68", in DEF_TEST()
105 testQuadRootsReal(reporter, "two roots x^2 - 5", in DEF_TEST()
117 testQuadRootsReal(reporter, "no roots 5x^2 + 6x + 7", in DEF_TEST()
121 testQuadRootsReal(reporter, "no roots 4x^2 + 1", in DEF_TEST()
174 double roots[2]; in DEF_TEST() local
176 SkQuads::RootsReal(DBL_MAX, 0, DBL_MAX, roots) == 0, in DEF_TEST()
180 SkQuads::RootsReal(DBL_MAX, DBL_MAX, DBL_MAX, roots) == 0, in DEF_TEST()
185 SkQuads::RootsReal(1, NAN, -3, roots) == 0, in DEF_TEST()
189 SkQuads::RootsReal(0, NAN, 3, roots) == 0, in DEF_TEST()
193 SkQuads::RootsReal(0, 0, NAN, roots) == 0, in DEF_TEST()