Post Reply 
(50g) Bernoulli polynomials
12-17-2018, 07:03 PM
Post: #3
RE: (50g) Bernoulli polynomials
(12-17-2018 06:07 PM)DavidM Wrote:  One very easy way to accommodate the possibility of a varying number of arguments is to place them in a list { } before invoking the program. Placing a list of items on the stack is actually very easy (only one shifted key more than individually loading them). Your program then simply needs to execute LIST→ instead of DEPTH to determine how many arguments were given.

I believe this is a small adjustment to make in comparison to the benefits to the user of not having to clear the stack first.

I second this method. One can also begin the program with

Code:

IF DUP TYPE 5. SAME THEN OBJ\->... (do whatever with multiple args)
ELSE... (use program-supplied defaults)

to allow either a single argument with the program supplying defaults, or some or all arguments supplied by the user.

For example compare UTPN on the HP 50 with NORMALD_CDF, its rough equivalent on the Prime.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(50g) Bernoulli polynomials - peacecalc - 12-17-2018, 05:31 PM
RE: (50g) Bernoulli polynomials - DavidM - 12-17-2018, 06:07 PM
RE: (50g) Bernoulli polynomials - John Keith - 12-17-2018 07:03 PM
RE: (50g) Bernoulli polynomials - DavidM - 12-17-2018, 08:37 PM
RE: (50g) Bernoulli polynomials - ttw - 12-17-2018, 09:17 PM
RE: (50g) Bernoulli polynomials - ijabbott - 12-17-2018, 11:58 PM
RE: (50g) Bernoulli polynomials - DavidM - 12-29-2018, 04:40 PM
RE: (50g) Bernoulli polynomials - ttw - 01-02-2019, 11:13 PM



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