HP Forums
RPN calculator options for special functions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: RPN calculator options for special functions (/thread-22636.html)



RPN calculator options for special functions - carey - 11-02-2024 08:33 PM

I’m interested in calculating special functions (e.g., Bessel, Gamma, Error, etc.) and using them in programs. There are several RPN calculator options with built-in special functions, including:
- 41 clones (PX41C or DM41X) if used with modules
- W34S
- C47
Just curious about anyone’s experience-based opinions (e.g., usefulness and ease of use) on any of these options when used for this purpose.

Or would it be simpler (e.g., easier learning curve) to just use a calculator I'm already familiar with, e.g., 15C CE, DM42n (or even the HP27S solver if complex results aren't needed), and write or import special functions programs?


RE: RPN calculator options for special functions - Namir - 11-02-2024 11:31 PM

The typiical astute programmers write the various implementations of these functions, for diifferent calculators, to get the best values for typical arguments (not those in the extremes limits that folks like Joe Horn like to use).

Namir


RE: RPN calculator options for special functions - carey - 11-03-2024 01:13 AM

(11-02-2024 11:31 PM)Namir Wrote:  The typiical astute programmers write the various implementations of these functions, for diifferent calculators, to get the best values for typical arguments (not those in the extremes limits that folks like Joe Horn like to use).

Namir
Thank you Namir for your reply, but is your point that it is best to use either built-in routines or available programs for the above calculators rather than writing one’s own programs, with the reason being that existing special functions code is likely optimized for typical use cases (if written by “astute programmers”)?


RE: RPN calculator options for special functions - Thomas Klemm - 11-03-2024 08:18 AM

(11-02-2024 11:31 PM)Namir Wrote:  The typical astute programmers write the various implementations of these functions, for different calculators, to get the best values for typical arguments.

Here's an example: Gamma Function Using Spouge's Method
A lengthy discussion follows, but one of the conclusions is that it is difficult to achieve complete accuracy on an HP-41C when intermediate results are rounded to 10 digits:
(08-26-2015 09:50 AM)Dieter Wrote:  I think the only way to get 10 digits out of an HP41 is 13-digit MCode.
As mentioned, you can find special functions like GAM+ in Jean-Marc Baillard's hp41programs.

Since you mentioned that you are familiar with the HP-42S and HP-15C, you should have no trouble using the WP-34S, which includes these special functions.
I am not familiar with the C47, but I assume that this is the case there as well.

I would probably go with the DM42n and adjust Jean-Marc Baillard's Special Functions for it.
You have to replace the synthetic registers like M, N, O by ordinary registers like 00, 01, 02.

Whatever you use, I recommend double-checking the results with Wolfram|Alpha or Mathematica on the range of numbers you are interested in.


RE: RPN calculator options for special functions - carey - 11-03-2024 09:49 AM

Thank you Thomas!
This is exactly the type of advice I was hoping for!


RE: RPN calculator options for special functions - Paul Dale - 11-03-2024 10:45 AM

The WP 34S doesn't include Bessel functions, they didn't fit. The WP 43 and C47 both include Bessel functions, although the order is limited to reals. I'd like to implement complex order eventually.

Experience with the HP 42S puts you in good stead to use the C47. That's one of the things I really like about the C47, I know where the keys are from my use of the 42S.


RE: RPN calculator options for special functions - John Keith - 11-03-2024 12:10 PM

Considering the speed and 34-digit numerical precision of Free42 and the large memory of the DM42n, it would be well worth creating a library of special functions. If it was based on JMB's HP-41 programs, they would also need to be modified for the higher precision of Free42 by increasing the number of iterations and the precision of constants etc. There are several recent threads in these Forums regarding special functions (some of which I have contributed to) which may also be of use.


RE: RPN calculator options for special functions - carey - 11-03-2024 04:36 PM

(11-03-2024 10:45 AM)Paul Dale Wrote:  Experience with the HP 42S puts you in good stead to use the C47. That's one of the things I really like about the C47, I know where the keys are from my use of the 42S.

Thank you Paul! I recently received a C47 overlay in the mail and this sounds like a good reason to use it!

(11-03-2024 12:10 PM)John Keith Wrote:  Considering the speed and 34-digit numerical precision of Free42 and the large memory of the DM42n, it would be well worth creating a library of special functions. If it was based on JMB's HP-41 programs, they would also need to be modified for the higher precision of Free42 by increasing the number of iterations and the precision of constants etc. There are several recent threads in these Forums regarding special functions (some of which I have contributed to) which may also be of use.

Thanks John! Your comments were very helpful!


RE: RPN calculator options for special functions - 0.5qubit - 11-16-2024 01:48 AM

My first and only post in these forums was about special functions. Is the recent PX41CX adequate to run JMB's programs?