Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

this patch removes the check for the upper bound of the second parameter of
TINV. I checked the algorithm of TINV but there seems to be no reason to
limit this number.

The only problem is that for values greater than 1E14 the rounding error
dramatically increases but in my opinion everyone who uses such large
numbers should know about problems related to rounding and floating point
arithmetic.

Regards,
Markus
From b2038a42e5bd8fc49755abd687c351f3efc15347 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Wed, 20 Jul 2011 11:22:32 +0200
Subject: [PATCH] fix fod fdo#37218: second paramter of tinv cna't be greater than 10000

---
 sc/source/core/tool/interpr3.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 3eec994..095387a 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -2095,7 +2095,7 @@ void ScInterpreter::ScTInv()
         return;
     double fDF  = ::rtl::math::approxFloor(GetDouble());
     double fP = GetDouble();
-    if (fDF < 1.0 || fDF >= 1.0E5 || fP <= 0.0 || fP > 1.0 )
+    if (fDF < 1.0 || fP <= 0.0 || fP > 1.0 )
     {
         PushIllegalArgument();
         return;
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.