The Museum of HP Calculators

HP Forum Archive 21

 Inverse binomialMessage #1 Posted by Richard Berler on 7 July 2013, 9:32 p.m. 1) On both my emulator and my physical unit, inverse binomial with p=.5 stored in j, n=10 stored in k for .005 yields 10. I was expecting 0 or possibly 1. .006 correctly produces an answer of 1. 2) On my emulator when trying large n such as 1 E 06, inverse binomial p=.5, n (k)=1 E 06 for .75 produces 500337. My physical unit produces "reset". The physical unit will come up with a proper result for .75=501288. 2) might be due to older version (3.1 3278)

 Re: Inverse binomialMessage #2 Posted by Richard Berler on 7 July 2013, 10:28 p.m.,in response to message #1 by Richard Berler Physical unit produces correct answer of 501288 for .995 (not the .75 that I accidentally reported).

 Re: Inverse binomialMessage #3 Posted by Marcus von Cube, Germany on 8 July 2013, 3:43 a.m.,in response to message #1 by Richard Berler I'm not the one to answer your question about the proper results, but "reset" is definitely not the intended answer. It looks like another internal stack overflow issue or the like.

 Re: Inverse binomialMessage #4 Posted by Nick_S on 8 July 2013, 4:44 a.m.,in response to message #1 by Richard Berler Using the R statistical package I get a value of 1 for your first example qbinom(.005,10,.5) 1 and 500337 for your second example qbinom(.75,1e6,.5) 500337 Nick Edited: 10 July 2013, 11:28 a.m.

 Re: Inverse binomialMessage #5 Posted by Walter B on 8 July 2013, 4:58 a.m.,in response to message #1 by Richard Berler Hi Richard, Thanks for reporting. Your observation 1) is definitively a bug. Even 0.0051 Binom^(-1) returns 1. I guess the cause is some internal rounding or truncating. d:-)

 Re: Inverse binomialMessage #6 Posted by Paul Dale on 8 July 2013, 5:10 a.m.,in response to message #5 by Walter B I think we should fix the memory/stack overflow/corruption bug 2 before jumping to any conclusions about the cause of 1. - Pauli

 Re: Inverse binomialMessage #7 Posted by Walter B on 8 July 2013, 5:16 a.m.,in response to message #6 by Paul Dale I concur. Go ahead! d:-)

 Re: Inverse binomialMessage #8 Posted by Marcus von Cube, Germany on 9 July 2013, 6:23 a.m.,in response to message #1 by Richard Berler The "Reset" proved to be the watch dog kicking in. I've added another call to service the watch dog in the code and the "Reset" seems to be gone. Maybe Pauli can find a way to speed up the calculation a little. It just took too long...

Go back to the main exhibit hall