summaryrefslogtreecommitdiff
path: root/scaddins
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 14:14:28 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 14:14:28 +0000
commit7852dd2a6c2d984b27455016389be99ec6a1d1d2 (patch)
treed7015ffe15d9ab650c556b0b52cd061253541859 /scaddins
parent36ba23bbb4a22d572467cebd80827298ae8ae62f (diff)
INTEGRATION: CWS apps61beta2 (1.37.8.2.14); FILE MERGED
2003/04/04 14:10:19 dr 1.37.8.2.14.2: #i12430# fixed Bessely1() 2003/04/04 11:56:32 dr 1.37.8.2.14.1: #108627# throw, if date is negative
Diffstat (limited to 'scaddins')
-rw-r--r--scaddins/source/analysis/analysishelper.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 815221a732b7..5181b7f07faf 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: analysishelper.cxx,v $
*
- * $Revision: 1.38 $
+ * $Revision: 1.39 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 17:46:44 $
+ * last change: $Author: hr $ $Date: 2003-04-28 15:14:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -265,7 +265,11 @@ sal_Int32 DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
*/
void DaysToDate( sal_Int32 nDays, sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear )
+ throw( lang::IllegalArgumentException )
{
+ if( nDays < 0 )
+ throw lang::IllegalArgumentException();
+
sal_Int32 nTempDays;
sal_Int32 i = 0;
sal_Bool bCalc;
@@ -959,6 +963,8 @@ double Bessely1( double fNum )
}
else
{
+#if 0
+ // #i12430# don't know the intention of this piece of code...
double z = 8.0 / fNum;
double y = z * z;
double xx = fNum - 2.356194491;
@@ -971,6 +977,9 @@ double Bessely1( double fNum )
y * 0.105787412e-6 ) ) );
fRet = sqrt( 0.636619772 / fNum ) * ( sin( xx ) * f1 + z * cos( xx ) * f2 );
+#endif
+ // #i12430# ...but this seems to work much better.
+ fRet = sqrt( 0.636619772 / fNum ) * sin( fNum - 2.356194491 );
}
return fRet;