Issue 26836 - Precision Problem in OOo 1.1.0 Calc (NORMINV)
Summary: Precision Problem in OOo 1.1.0 Calc (NORMINV)
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks: 18704
  Show dependency tree
 
Reported: 2004-03-22 20:01 UTC by psiplus
Modified: 2013-08-07 15:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document containing the NORMINV function (7.54 KB, application/octet-stream)
2004-03-23 10:32 UTC, frank
no flags Details
New gaussinv-implementation for OOo Calc (gaussinv.c) (2.90 KB, text/plain)
2004-03-23 21:05 UTC, psiplus
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description psiplus 2004-03-22 20:01:29 UTC
I use OpenOffice.org 1.1.0 in mathematics in school, and I have a heavy 
problem:  
NORMINV(0,975;0;1) 
Should output something like 1.959962, but the result in OOo is 1,960395!! 
 
Validated the value with some Calculators like TI-92 and TI-200 Voyage and 
excel...
Comment 1 frank 2004-03-23 10:32:40 UTC
Created attachment 13988 [details]
Document containing the NORMINV function
Comment 2 frank 2004-03-23 10:34:07 UTC
Hi Eike,

please have a look at this.

I've attached a document with this function.

Frank
Comment 3 psiplus 2004-03-23 10:40:46 UTC
Yes! Exactly this problem! I proofed the values from the sheety by my TI 
Calculator and the HP Calculator of a friend... (I'm sorry that I forgot to 
post my spreadsheet as example as you, fst ;-) 
Comment 4 ooo 2004-03-23 12:24:46 UTC
Another manifestation of issue 18704. Adding needhelp keyword and targeting to
OOoLater right now for time reasons. Implementation is in
sc/source/core/tool/interpr3.cxx ScInterpreter::ScNormInv() respectively the
gaussinv() method used therein.
Comment 5 psiplus 2004-03-23 21:03:39 UTC
Ha Haa!!! 
 
Okay, I got it... Was not easy, but I played arround with it, found out that t 
steps are not deph enough and so on... But after a small look at the way 
Gnumeric implements it - I found out they use AS241, I tried too... It's a 
little bit different implement, but it works perfectly. Should solve all 
problems with gaussinv! 
 
I hope it is usefull for you and you can integrate it into 1.1.1 ;-) 
 
tried it with all statistical functions i know using gaussinv with nearly 
perfect results, but PLEASE test it too! Nobody is perfect, maybe I did 
bullshit somewhere without see'ing it ;-) 
 
The workarround is postet as simple C-File! 
 
Have Fun! 
Martin 
Comment 6 psiplus 2004-03-23 21:05:58 UTC
Created attachment 14012 [details]
New gaussinv-implementation for OOo Calc (gaussinv.c)
Comment 7 niklas.nebel 2004-03-29 17:10:40 UTC
We can't use any code without the JCA (Joint Copyright Assignment, see
http://www.openoffice.org/contributing.html).
Comment 8 niklas.nebel 2005-09-30 09:00:43 UTC
psiplus, are you willing to submit a JCA for the code?
Comment 9 psiplus 2005-09-30 11:21:54 UTC
Hi

I just sent it by fax :-) ... Sorry, I forgot about it... I hope the pice of
code can now be added, and maybe added to OOo2 ;-) ... ... I work with it for
more than one now without problems...

Have Fun!
Martin
Comment 10 niklas.nebel 2005-10-11 18:27:22 UTC
I'm taking care of this.
Comment 11 niklas.nebel 2005-10-11 19:26:36 UTC
I put this into the CWS "dr42" (interpr3.cxx 1.14.2.1), so it will get into OOo
2.0.1.
Thanks a lot for the patch, Martin.

For testing: This affects functions NORMINV, NORMSINV, LOGINV and CONFIDENCE.
Note: The related issue 32833 (to use iteration instead of the approximation
formula) is still open, but might actually be obsoleted now.
Comment 12 niklas.nebel 2005-10-19 16:11:49 UTC
back to QA for verification

re-open issue and reassign to fst@openoffice.org
Comment 13 niklas.nebel 2005-10-19 16:11:54 UTC
reassign to fst@openoffice.org
Comment 14 niklas.nebel 2005-10-19 16:11:58 UTC
reset resolution to FIXED
Comment 15 frank 2005-10-21 14:34:16 UTC
found fixed on cws dr42 using Linux, Solaris and Windows build
Comment 16 frank 2005-11-21 12:33:20 UTC
Found integrated on master m142 using Linux, Solaris and Windows Build
Comment 17 versurppersio 2010-11-10 16:31:31 UTC
Created attachment 73205