Skip to content
Snippets Groups Projects
Commit e431a8d0 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

compute relativeError only if the result isn't nan

[[Imported from SVN: r3249]]
parent 6367a9f2
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ void ::LoopSolver<VectorType, BitVectorType>::solve() ...@@ -105,7 +105,7 @@ void ::LoopSolver<VectorType, BitVectorType>::solve()
} }
// Turn the error into the relative error, if requested // Turn the error into the relative error, if requested
if (this->useRelativeError_) if (this->useRelativeError_ && !std::isnan(error/oldNorm))
error = error / oldNorm; error = error / oldNorm;
if (!isinf(convRate) && !isnan(convRate) && i>0) { if (!isinf(convRate) && !isnan(convRate) && i>0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment