summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/interpr5.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 88cd12dd9a5c..eac7cd46b2ab 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -711,11 +711,12 @@ static int lcl_LUP_decompose( ScMatrix* mA, const SCSIZE n,
// Compute Schur complement.
for (SCSIZE i = k+1; i < n; ++i)
{
- double fTmp = mA->GetDouble( k, i) / mA->GetDouble( k, k);
- mA->PutDouble( fTmp, k, i);
+ double fNum = mA->GetDouble( k, i);
+ double fDen = mA->GetDouble( k, k);
+ mA->PutDouble( fNum/fDen, k, i);
for (SCSIZE j = k+1; j < n; ++j)
- mA->PutDouble( mA->GetDouble( j, i) - fTmp * mA->GetDouble( j,
- k), j, i);
+ mA->PutDouble( ( mA->GetDouble( j, i) * fDen -
+ fNum * mA->GetDouble( j, k) ) / fDen, j, i);
}
}
#if OSL_DEBUG_LEVEL > 1