Issue 74704 - B(total,1,min,max) gives Err:502
Summary: B(total,1,min,max) gives Err:502
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks: 18704
  Show dependency tree
 
Reported: 2007-02-20 17:37 UTC by Regina Henschel
Modified: 2017-05-20 11:41 UTC (History)
1 user (show)

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


Attachments
adds the missing branches to ScB in interpr3.cxx (1.12 KB, text/plain)
2009-07-12 15:45 UTC, Regina Henschel
no flags Details
test for the patch (16.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-07-12 15:46 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2007-02-20 17:37:31 UTC
If you use "1" for the success probability you get a Err:502. But that is not
necessary. If you use BINOMDIST, you get no error.
Example
 B(10;1;0;4) gives Err:502 
But
 BINOMDIST(4;10;1;1) works and gives 0.
For success probability less than 1 the values of B(n;p;0;k) and
BINOMDIST(k;n;1;1) are identical.

It should result in 1 if max=total and 0 in all other cases.
Comment 1 frank 2007-02-21 13:12:59 UTC
Hi Eike,

please have a look at this one.

Frank
Comment 2 ooo 2007-02-21 20:00:30 UTC
Accepted.
Comment 3 Martin Hollmichel 2007-11-09 16:52:27 UTC
change target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x
Comment 4 Regina Henschel 2009-07-12 15:42:46 UTC
I changed the case distinction and add the values for the missing cases p=0 and p=1.
The spreadsheet contains two sheets with contain all possible cases, to verify,
that the changes do not break the branching in other cases. The third sheet
contains examples and a comparison to the handling of p=0 and p=1 in similar
BINOMDIST to verify the results.
Comment 5 Regina Henschel 2009-07-12 15:45:28 UTC
Created attachment 63497 [details]
adds the missing branches to ScB in interpr3.cxx
Comment 6 Regina Henschel 2009-07-12 15:46:41 UTC
Created attachment 63498 [details]
test for the patch
Comment 7 ooo 2009-07-13 11:32:38 UTC
Nice, thanks.
Comment 8 ooo 2009-08-20 23:03:38 UTC
In cws odff06:

revision 275203
sc/source/core/tool/interpr3.cxx
Comment 9 ooo 2009-09-03 21:11:08 UTC
Reassigning to QA for verification.
Comment 10 oc 2009-09-09 15:57:52 UTC
verified in internal build cws_odff06