( Jump to the original submission)
Thu 14 Feb 2013 05:57:14 AM UTC, comment #6:
I added special testing for these boundary value cases to ensure compatibility with Matlab (http://hg.savannah.gnu.org/hgweb/octave/rev/444de2c0af0e). To access the fix the original reporter will need to build from Mercurial sources or wait until the next major release (3.8.0).

Thu 14 Feb 2013 05:12:56 AM UTC, comment #5:
Should have posted this here as well as to the list:
>> version
ans =
7.9.0.529 (R2009b)
>> binopdf(0,0,0)
ans =
1
>> binopdf(0,0,0.5)
ans =
1
>> binopdf(0,0,1)
ans =
1
>> binopdf(1,0,1)
ans =
0
>>
Michael

Wed 13 Feb 2013 11:28:04 PM UTC, comment #4:
I see where the problem lies. Fixing it will require adding some special input test code.
In order to get compatibility, What does Matlab return for

Wed 13 Feb 2013 03:23:23 PM UTC, comment #3:
Of course, this applies also to binopdf(n,n,1). This is by definition the same and hence must also be 1: out of n experiments, each with 100% probability of success, the are n successes.

Wed 13 Feb 2013 05:30:06 AM UTC, comment #2:
Matlab returns 1

Wed 13 Feb 2013 04:13:53 AM UTC, comment #1:
Do you have access to Matlab? What do they return for this corner case?

Sat 09 Feb 2013 07:31:30 PM UTC, original submission:
By definition, with n > 0:
This is the probability that out of n experiments, each with zero probability of success, the are zero successes. However, Ocave gives a NaN instead of 1.
With positive but verynearzero probability of success, Octave gives a 1. For instance:
With a finite machine precision, this is correct.

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found