Commit 265aaf47 authored by Davis King's avatar Davis King

Added missing std::abs() calls.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403868
parent 02cdfcf4
...@@ -1097,7 +1097,8 @@ convergence: ...@@ -1097,7 +1097,8 @@ convergence:
// compute the first column // compute the first column
for (long r = 1; r < A.nr(); ++r) for (long r = 1; r < A.nr(); ++r)
{ {
if (L(0,0) > eps*A(r,0)) // if (L(0,0) > 0)
if (L(0,0) > eps*std::abs(A(r,0)))
L(r,0) = A(r,0)/L(0,0); L(r,0) = A(r,0)/L(0,0);
else else
return L; return L;
...@@ -1123,7 +1124,9 @@ convergence: ...@@ -1123,7 +1124,9 @@ convergence:
{ {
temp -= L(r,i)*L(c,i); temp -= L(r,i)*L(c,i);
} }
if (L(c,c) > eps*temp)
// if (L(c,c) > 0)
if (L(c,c) > eps*std::abs(temp))
L(r,c) = temp/L(c,c); L(r,c) = temp/L(c,c);
else else
return L; return L;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment