Skip to content

Commit

Permalink
Вывод самого уравнения в больших случайных тестах для анализа
Browse files Browse the repository at this point in the history
  • Loading branch information
stden committed May 23, 2015
1 parent 79cb23b commit 719fbfe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/QuadraticEquationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public void testBigRandom() {
double[] roots = QuadraticEquation.solve(a, b, c);
stats[roots.length]++;
for (double x : roots) {
assertEquals(0.0, a * Math.pow(x, 2) + b * x + c, 1e-6);
assertEquals(a + " x^2 + " + b + " x + " + c + " = 0",
0.0, a * Math.pow(x, 2) + b * x + c, 1e-8);
}
}
System.out.println("Нет решений: " + stats[0]);
Expand Down

0 comments on commit 719fbfe

Please sign in to comment.