(50g) Bernoulli polynomials
12-17-2018, 07:03 PM
Post: #3
 John Keith Senior Member Posts: 776 Joined: Dec 2013
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.
 « Next Oldest | Next Newest »

 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 - peacecalc - 12-17-2018, 10:03 PM RE: (50g) Bernoulli polynomials - ijabbott - 12-17-2018, 11:58 PM RE: (50g) Bernoulli polynomials - peacecalc - 12-22-2018, 11:06 PM RE: (50g) Bernoulli polynomials - John Keith - 12-23-2018, 07:58 PM RE: (50g) Bernoulli polynomials - peacecalc - 12-29-2018, 02:18 PM RE: (50g) Bernoulli polynomials - Albert Chan - 12-29-2018, 03:52 PM RE: (50g) Bernoulli polynomials - DavidM - 12-29-2018, 04:40 PM RE: (50g) Bernoulli polynomials - John Keith - 12-29-2018, 05:54 PM RE: (50g) Bernoulli polynomials - peacecalc - 12-30-2018, 01:44 PM RE: (50g) Bernoulli polynomials - ttw - 01-02-2019, 11:13 PM RE: (50g) Bernoulli polynomials - peacecalc - 01-03-2019, 10:20 AM

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