summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-06 13:57:48 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-06 13:57:48 +0000
commit0421beabd33d135e1ab5f4a5a57eea836a93549b (patch)
treed057931054b8e8d7fea31e64c8149a9efd832c1a /sal/rtl
parentd8c0728fffbe6526babf35d9b8425d296f53394e (diff)
CWS-TOOLING: integrate CWS odff05
2008-12-11 04:17:37 +0100 er r265237 : #i94555# AppendIntToken for GAMMADIST, Excel needs 4 parameters; also use AppendIntToken instead of AppendNumToken for POISSON 2008-12-11 04:04:27 +0100 er r265236 : #i96837# make cumulative parameter of POISSON optional; patch from <lvyue> with slight modifications 2008-12-11 03:35:03 +0100 er r265235 : #i96835# make base parameter of LOG() optional also in UI; patch from <lvyue> 2008-12-11 03:15:30 +0100 er r265234 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-10 18:14:16 +0100 er r265214 : DBG_... need semicolon 2008-12-05 00:49:55 +0100 er r264881 : WaE unxlngi6: declaration of 'pFuncInfo' shadows a previous local 2008-12-05 00:26:05 +0100 er r264879 : #i91547# BETADIST with optional density/cumulative parameter and much better precision; patch from <regina> 2008-12-04 22:51:40 +0100 er r264877 : #i91602# add expm1() and log1p() replacements; based on a patch from <regina> 2008-12-01 16:07:35 +0100 dr r264614 : #i93789# import of EUROCONVERT from XLSX/XLSB 2008-11-28 13:15:01 +0100 dr r264543 : #i93789# new sheet function EUROCONVERT + XLS import/export, patch contributed by lvyue 2008-11-26 14:54:23 +0100 er r264397 : CWS-TOOLING: rebase CWS odff05 to trunk@264325 (milestone: DEV300:m36) 2008-11-20 14:23:33 +0100 er r264053 : CWS-TOOLING: rebase CWS odff05 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 18:07:43 +0100 er r264012 : merged from trunk 2008-11-19 17:51:36 +0100 er r264011 : migrate CWS odff05 to SVN
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/math.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index 91317d221ad5..c3b7147fb606 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -959,3 +959,24 @@ double SAL_CALL rtl_math_approxValue( double fValue ) SAL_THROW_EXTERN_C()
return bSign ? -fValue : fValue;
}
+
+
+double SAL_CALL rtl_math_expm1( double fValue ) SAL_THROW_EXTERN_C()
+{
+ double fe = exp( fValue );
+ if (fe == 1.0)
+ return fValue;
+ if (fe-1.0 == -1.0)
+ return -1.0;
+ return (fe-1.0) * fValue / log(fe);
+}
+
+
+double SAL_CALL rtl_math_log1p( double fValue ) SAL_THROW_EXTERN_C()
+{
+ double fp = 1.0 + fValue;
+ if (fp == 1.0)
+ return fValue;
+ else
+ return log(fp) * fValue / (fp-1.0);
+}