Skip to content

solve_deg3 gives incorrect result (polynom_solver.cpp) #19526

@fantaclaus

Description

@fantaclaus

function solve_deg3 from opencv/modules/calib3d/src/polynom_solver.cpp
gives an incorrect result = -nan
for a=3.0, b=3.0, c=1.0, d=1.0

double x0, x1, x2;

auto n = solve_deg3(3.0, 3.0, 1.0, 1.0, x0, x1, x2);

n is 1
x0 is -nan(ind) but it should be -1.0

Compiled and run in MS VisualStudio 2019.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions