Commit dcadc4f8 authored by Andrey Kamaev's avatar Andrey Kamaev

#1765 Fixed solvePoly for polynomials having coeffs[n] != 1

parent 5ce2997c
...@@ -2487,7 +2487,7 @@ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters ) ...@@ -2487,7 +2487,7 @@ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
for( i = 0; i < n; i++ ) for( i = 0; i < n; i++ )
{ {
p = roots[i]; p = roots[i];
C num = coeffs[n], denom = 1; C num = coeffs[n], denom = coeffs[n];
for( j = 0; j < n; j++ ) for( j = 0; j < n; j++ )
{ {
num = num*p + coeffs[n-j-1]; num = num*p + coeffs[n-j-1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment