mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
reduce float warnings (comparisons and implicit conversions)
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
51311ec651
commit
d271a7d545
@@ -519,7 +519,7 @@ void FullPivLU<MatrixType>::computeInPlace()
|
||||
row_of_biggest_in_corner += k; // correct the values! since they were computed in the corner,
|
||||
col_of_biggest_in_corner += k; // need to add k to them.
|
||||
|
||||
if(biggest_in_corner==Score(0))
|
||||
if(numext::is_exactly_zero(biggest_in_corner))
|
||||
{
|
||||
// before exiting, make sure to initialize the still uninitialized transpositions
|
||||
// in a sane state without destroying what we already have.
|
||||
|
||||
@@ -378,7 +378,7 @@ struct partial_lu_impl
|
||||
|
||||
row_transpositions[k] = PivIndex(row_of_biggest_in_col);
|
||||
|
||||
if(biggest_in_corner != Score(0))
|
||||
if(!numext::is_exactly_zero(biggest_in_corner))
|
||||
{
|
||||
if(k != row_of_biggest_in_col)
|
||||
{
|
||||
@@ -404,7 +404,7 @@ struct partial_lu_impl
|
||||
{
|
||||
Index k = endk;
|
||||
row_transpositions[k] = PivIndex(k);
|
||||
if (Scoring()(lu(k, k)) == Score(0) && first_zero_pivot == -1)
|
||||
if (numext::is_exactly_zero(Scoring()(lu(k, k))) && first_zero_pivot == -1)
|
||||
first_zero_pivot = k;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user