Bessel functions
|
10-30-2017, 10:21 PM
Post: #1
|
|||
|
|||
Bessel functions
hi everybody,
there is a good post in the HP Prime Software part of the Forum (here) about the Bessel functions of 1st kind, by Eddie W. Shore and roadrunner. I need some help to implementate in a simple way also the 2nd kind functions, starting or not by the functions proposed by Eddie and roadrunner. Any help will be appreciated, thank you. Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
10-31-2017, 01:12 AM
(This post was last modified: 11-01-2017 11:48 AM by toml_12953.)
Post: #2
|
|||
|
|||
RE: Bessel functions
(10-30-2017 10:21 PM)salvomic Wrote: hi everybody, Here's one I converted from a C program I found at Bessel Second Kind (the Prime comes up with a different answer. The answer in the code is right - I don't know why the Prime is so far off.): N.B. The code below changes LOG to LN which fixes the problem in the original code. Code: //************************************************************************ Tom L Cui bono? |
|||
10-31-2017, 08:37 AM
Post: #3
|
|||
|
|||
RE: Bessel functions
(10-31-2017 01:12 AM)toml_12953 Wrote: Here's one I converted from a C program I found at Bessel Second Kind (the Prime comes up with a different answer. The answer in the code is right - I don't know why the Prime is so far off.): Thank you. In fact is very strange: VC returns -2.622... instead of -2.629... ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
10-31-2017, 09:14 PM
Post: #4
|
|||
|
|||
RE: Bessel functions
(10-31-2017 08:37 AM)salvomic Wrote:(10-31-2017 01:12 AM)toml_12953 Wrote: Here's one I converted from a C program I found at Bessel Second Kind (the Prime comes up with a different answer. The answer in the code is right - I don't know why the Prime is so far off.): Problem solved! The HPPL function LOG computes the common log while in C (and BASIC) LOG returns the natural log. In the HPPL program change all the LOG to LN and the program works as expected. Tom L Cui bono? |
|||
10-31-2017, 11:56 PM
Post: #5
|
|||
|
|||
RE: Bessel functions
(10-31-2017 09:14 PM)toml_12953 Wrote:(10-31-2017 08:37 AM)salvomic Wrote: Thank you. well, Tom! please, could you put a correct version in the Prime Software section of the Forum under something like "Bessel 2nd kind..."? Or, if you want could do it for you... Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
11-01-2017, 12:22 AM
Post: #6
|
|||
|
|||
RE: Bessel functions
(10-31-2017 11:56 PM)salvomic Wrote:(10-31-2017 09:14 PM)toml_12953 Wrote: Problem solved! The HPPL function LOG computes the common log while in C (and BASIC) LOG returns the natural log. In the HPPL program change all the LOG to LN and the program works as expected. I did it. It's called "Bessel Function Second Kind" (I don't know where I come up with these catchy names!) Tom L Cui bono? |
|||
11-01-2017, 12:36 AM
Post: #7
|
|||
|
|||
RE: Bessel functions
(11-01-2017 12:22 AM)toml_12953 Wrote: I did it. It's called "Bessel Function Second Kind" (I don't know where I come up with these catchy names!) thank you, it works. However I suggest to make the program "more friendly", not using Tbessly() to get the correct value for n=2, but with a function like bessel2(n,x) where the user could choose the number and the value to calc for, like the program for bessel1... ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
11-01-2017, 04:35 AM
(This post was last modified: 11-01-2017 04:41 AM by toml_12953.)
Post: #8
|
|||
|
|||
RE: Bessel functions
(11-01-2017 12:36 AM)salvomic Wrote:(11-01-2017 12:22 AM)toml_12953 Wrote: I did it. It's called "Bessel Function Second Kind" (I don't know where I come up with these catchy names!) It already has that function. It's called BESSY(N,X). The wrapper (Tbessy) calls it. Just insert the word EXPORT at the beginning of the BESSY routine and you can call BESSY from any other program or the home screen. I made the change to the program in the library. Thanks for the suggestion! Tom L Cui bono? |
|||
11-01-2017, 09:11 AM
Post: #9
|
|||
|
|||
RE: Bessel functions
Thank you Tom!
I've seen it in the Library section, I tested it with some values in the literature and the function is very precise. So, with this one and that of Eddie's we have both Bessel 1st and 2nd kind in the Prime! Salvo Micciché ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)