diff options
author | gt <gt@openoffice.org> | 2001-08-31 07:23:29 +0000 |
---|---|---|
committer | gt <gt@openoffice.org> | 2001-08-31 07:23:29 +0000 |
commit | cbe30afdd25e95b42f1043ca3b90375df7bce8cb (patch) | |
tree | e55e8d598bddd1d9ef076759f0984bd10a81669f /scaddins/source/analysis/analysishelper.cxx | |
parent | 3023a6fee39236bc7f904eaf4d0852d88ff023ad (diff) |
#91770# formula for ODDLPRICE was wrong
Diffstat (limited to 'scaddins/source/analysis/analysishelper.cxx')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index fc94e48d95e0..56ed7d4975bf 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: analysishelper.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: gt $ $Date: 2001-08-24 07:16:52 $ + * last change: $Author: gt $ $Date: 2001-08-31 08:23:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1760,8 +1760,8 @@ double GetOddlprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal double fAi = GetYearFrac( nNullDate, nLastCoup, nSettle, nBase ) * fFreq; double p = fRedemp + fDCi * 100.0 * fRate / fFreq; - p /= 100.0 + fDSCi * 100.0 * fYield / fFreq - ( fAi * 100.0 * fRate / fFreq ); - p *= 100.0; + p /= fDSCi * fYield / fFreq + 1.0; + p -= fAi * 100.0 * fRate / fFreq; return p; } |