Division by Zero
Submitted by Kacper Pluta
Assigned to Nobody
Link to original bugzilla bug (#1679)
Version: 3.3 (current stable)
Description
In
emplate<typename MatrixType>
typename ComplexSchur<MatrixType>::ComplexScalar ComplexSchur<MatrixType>::computeShift(Index iu, Index iter)
there is
if(numext::norm1(eival1) > numext::norm1(eival2))
eival2 = det / eival1;
else
eival1 = det / eival2;
but it can happen that eival1 and eival2 are zeros and this leads to division by zero.
I found the bug while computing eigenvalues and placing in my code:
#include <fenv.h>
feenableexcept ( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
Do not hesitate to ask me for more information.
Edited by Eigen Bugzilla