Post Reply 
[WP34s] Regularized incomplete Beta function
05-02-2014, 08:48 PM (This post was last modified: 05-02-2014 08:51 PM by Dieter.)
Post: #12
RE: [WP34s] Regularized incomplete Beta function
(05-01-2014 11:01 PM)Thomas Klemm Wrote:  It violates the principle of least astonishment.
...
IMHO that's not consistent. Of course you are free to define it the way you want. But then there are conventions. Thus we have to remember which of the functions follow it. Or then we always have to use a manual or reference guide.

First of all: yes, I am a big fan of the POLA principle as well. I love things that work naturally in the way I would expect if there was no manual. On the 34s, most functions follow this paradigm. Others do not as there are good reasons for doing things differently.

The \(log_xy\) command is such an example. Long time ago this has been discussed in the old forum, and the majority (including me) voted for the current solution, essentially because of the same reason why the original HP 35 had a \(x^ y\) key and the general root function is \(\sqrt[x]y\).

Then consider the Σ+ and Σ- keys. I always found the way data pairs have to be entered somewhat awkward – why can't I simply type x [ENTER] y? Why do I have to key in y first and then x? It's because the X-register is used for x-related data and the Y-register for those that relate to y: think of means, standard deviations, sums, etc.

That's why I think that sometimes the POLA principle might not be the best possible solution. Looking at the regularized incomplete Beta function, the usual notation \(I_x (a, b)\) would suggest using X for x and the higher stack levels for the two parameters a and b. Which means that x is entered as the last value, not the first. This also makes sense if you think of the LastX command: Which of the three values would you like to recover via RCL L? I'd vote for x here. Would you agree?

That's why my suggestion for the argument sequence of this function is a [ENTER] b [ENTER] x or, maybe even better, b [ENTER] a [ENTER] x. Remember, it's RPN after all. ;-)

Code:
Z:  a          b
Y:  b    or    a
Z:  x          x

In other words, the 34s function would evaluate \(I_x (z, y)\) or \(I_x (y, z)\). Either way is fine by me, with some preference for the latter. Which happens to be the way that is stated in the manual, so it seems to be the obvious choice here. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [WP34s] Regularized incomplete Beta function - Dieter - 05-02-2014 08:48 PM



User(s) browsing this thread: 1 Guest(s)