Skip to content

Commit

Permalink
WIP #1056 in diophantinePolynomial only call QuadraticSolver.solve
Browse files Browse the repository at this point in the history
- suggested by @Mangara
- `QuadraticSolver.solve` already defers to `ParabolicSolver`
  • Loading branch information
axkr committed Oct 17, 2024
1 parent 46372e5 commit e3d6190
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
import io.github.mangara.diophantine.QuadraticSolver;
import io.github.mangara.diophantine.Utils;
import io.github.mangara.diophantine.XYPair;
import io.github.mangara.diophantine.quadratic.ParabolicSolver;
import io.github.mangara.diophantine.quadratic.PellsSolver;

public final class NumberTheory {
Expand Down Expand Up @@ -6725,13 +6724,6 @@ private static IASTAppendable diophantinePolynomial(
return result;
}
}
if (a.signum() != 0 || b.signum() != 0 || c.signum() != 0) {
// D := b^2 - 4ac && D == 0
BigInteger D = b.multiply(b).subtract(a.multiply(c).multiply(BigInteger.valueOf(4)));
if (D.signum() == 0) {
diophantineSolver = ParabolicSolver.solve(a, b, c, d, e, f);
}
}
if (diophantineSolver == null) {
diophantineSolver = QuadraticSolver.solve(a, b, c, d, e, f);
}
Expand Down

0 comments on commit e3d6190

Please sign in to comment.