From 81409e3d767dab5d0075a771c2ac4de86d0ff899 Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Wed, 21 Apr 2021 13:22:24 -0400
Subject: [PATCH 2/8] solve_deg3-underflow

---
 modules/calib3d/src/polynom_solver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/calib3d/src/polynom_solver.cpp b/modules/calib3d/src/polynom_solver.cpp
index 5025199..d8779a7 100644
--- a/modules/calib3d/src/polynom_solver.cpp
+++ b/modules/calib3d/src/polynom_solver.cpp
@@ -59,7 +59,7 @@ int solve_deg3(double a, double b, double c, double d,
   double D = Q3 + R * R;
   double b_a_3 = (1. / 3.) * b_a;
 
-  if (Q == 0) {
+  if (Q3 == 0) {
     if(R == 0) {
       x0 = x1 = x2 = - b_a_3;
       return 3;
-- 
2.31.1

