Accurate Bernoulli numbers on the 41C, or "how close can you get"?
03-20-2014, 09:07 PM (This post was last modified: 03-20-2014 09:14 PM by Dieter.)
Post: #24
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"?
(03-20-2014 02:21 PM)Ángel Martin Wrote:  Believe it or not I typed the wrong value before. The result from ICPF is as follows:
ICPF(0.01) = -2,326347873, in 2.35 seconds.

That looks much better. ;-) Of course I did not assume that the Sandmath function would return a result with an error as large as in the previous value. BTW my current FOCAL program on a standard V41 runs in about 4,5 seconds.

(03-20-2014 02:21 PM)Ángel Martin Wrote:  Yes it is a polynomial approximation, two to be precise depending on the region.

Polynomials are very nice in compiled computer languages where it does not matter whether a constant has 2 or 15 digits, but on a calculator every single digit requires at least one byte of memory. I remember that some time ago I set up two rational approximations for the HP67/97 where the coefficients were kept in the primary and secondary registers which may be stored on a data card. ;-)

Multi-digit numeric constants in user code tend to slow down program execution, even on a HP41 where every value fits in a single line. On the other hand the method is very straightforward and fast by design. I just found an earlier HP41 program for the Normal quantile that uses two rational approximations. It runs in about 6 seconds (in FOCAL) for any input value on a hardware HP41.

BTW, if you are interested in rational approximations for the Normal quantile (or its evaluation in general) I can recommend the papers by W. T. Shaw. Several PDFs are available.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-09-2014, 07:12 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-10-2014, 12:20 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-10-2014, 08:23 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-12-2014, 04:34 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-14-2014, 10:05 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-14-2014, 09:37 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-14-2014, 10:00 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-14-2014, 10:21 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-14-2014, 10:04 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-15-2014, 09:32 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-15-2014, 12:26 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-15-2014, 06:12 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Thomas Klemm - 03-15-2014, 07:17 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-15-2014, 12:56 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-15-2014, 08:47 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-18-2014, 09:24 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-19-2014, 06:47 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-19-2014, 01:37 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-19-2014, 07:32 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-19-2014, 08:31 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-20-2014, 06:46 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-20-2014, 12:44 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-20-2014, 02:21 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-20-2014 09:07 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Ángel Martin - 03-21-2014, 05:54 AM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-21-2014, 01:37 PM RE: Accurate Bernoulli numbers on the 41C, or "how close can you get"? - Dieter - 03-28-2014, 07:56 PM

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