take into account possible inf and nan

This commit is contained in:
conrad
2025-05-20 22:27:38 +10:00
parent f845134e58
commit 623eb2915d
+4
View File
@@ -1162,10 +1162,14 @@ accu(const SpGlue<T1,T2,spglue_schur>& expr)
if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end
{
acc += (*x_it) * eT(0); // in case (*x_it) is inf or nan
++x_it;
}
else // x is closer to the end
{
acc += eT(0) * (*y_it); // in case (*y_it) is inf or nan
++y_it;
}
}