Skip to content

fix: issue 2481: LDLT produce wrong results with AutoDiffScalar

Mario Rincon-Nigro requested to merge pikecillo/eigen:fix-issue-2481 into master

Reference issue

#2481 (closed)

What does this implement/fix?

When the value of an AutoDiffScalar is 0 (as in the minimal example), some updates in the derivative that should take place in a triangular_solve_vector<...>::run are being skipped. See for instance: https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Core/products/TriangularSolverVector.h#L118 The error does not occur when the value of the AutoDiffScalar is something different than 0.

Proposed fix:

  • The check must take into account the value of the derivatives when checking AutoDiffScalar for zeroes

Additional information

Edited by Mario Rincon-Nigro

Merge request reports