The following warnings occurred:
Warning [2] Undefined array key 158819 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158820 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158821 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158824 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158825 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158861 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 158861 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





Question about how HP Math pacs calculate Bessel Functions!



#2

Hello All,

If you look in your HP-65 and HP-67 Math Pac manuals and the HP-41 High Level Math solution book, you may come across programs that calculate the Jn(x) and In(x) Bessel functions. These programs use recursive algorithms that calculate series of a specified number of terms m. The documentation calculates m using an interesting formula:

m = 2 * INT[(6 + max(n,z) + 9z/(z + 2))/2]

Where n is the order of the Bessel function and z = 3x/2.

My question, can anyone find the reference for HP's algorithms to calculate the Jn(x) and In(x) Bessel functions using the above equation?? The HP documentation mentions the "Handbook of Mathematical Functions" by Abramowitz et al. as a reference. I looked in that book and and the closest thing I found was at the bottom of page 385 (under the heading Numerical Methods). The handbook discusses informally the algorithm HP used but does not mention m and how it is calculated. Did I miss something? Or is the equation for m something HP came up with?

I guess you can say that this is a math challenge, with a new twist!

Namir


Edited: 3 Nov 2009, 4:20 p.m.


#3

I don´t know which edition of Abramowitz you have excess to. This source cites the 1972 edition which would fit the HP-67 timewise.

MathWorld

Abramowitz, M. and Stegun, I. A. (Eds.). "Spherical Bessel Functions." §10.1 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 437-442, 1972.


#4

I also have the blue-soft cover version. On page 385 (Bessel functions of integer orders) the book discusses in general terms basically the same algorithm that HP uses, except there is no mention for of m and the equation to calculate it. The discussion does mention the use of recursive iteration to calculate non-normalized Bessel function values, and then briefly hints at how to normalize them.

The HP documentation is much clearer. I was able to implement the algorithm in Excel VBA in two versions: using arrays and without arrays. Both yield accurate results.

Namir


#5

There's programs in the SandMath-5 module to calculate Jn, In, Kn, and Yn for both integer and non-integer indexes, and any real number. I used the usual approach given the relatively fast convergenge of the series.

Cheers,
ÁM

Edited: 4 Nov 2009, 3:35 a.m.


#6

Angel,

Your SandMath ROM looks VERY nice!!!

You calculate the Bessel functions Jn(x), In(x), Kn(x), and Yn(x) in your SandMath ROM. Do you base your calculations for ALL FOUR Bessel functions on an algorithm that is a similar one that HP uses? If yes, how do you calculate Kn(x) and Yn(x)? Sorry for being nosy.

Cheers,

Namir


Edited: 4 Nov 2009, 7:03 a.m.


#7

Hi Namir,

No complex stuff: it's basically just about summing terms until there's no significant contribution to the sum value. The process is sped-up by using a couple of MCODE functions involved in the function term calculation (like obviously GAMMA for non-integer orders, HARMN for the harmonic number, X=YR? for rounded comparisons, CHSYX, etc.), and a couple of re-arranging tricks of the series syntax to optimize the efficiency. It still takes its time, but this is a non-issue if you use V41's TURBO mode of course - it feels instantaneous response.

I considered an ALL-MCODE implementation but so far had no time to implemented, maybe some day...

I'm on the road for a couple of weeks but can send you more details when I'm back if you give me an email address to send it to.

Best,
ÁM.

Edited: 5 Nov 2009, 12:30 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help understanding math.... cyrille de Brébisson 9 3,697 12-13-2013, 02:23 AM
Last Post: Didier Lachieze
  HP Prime - CAS functions in Spreadsheet App CR Haeger 6 2,398 11-11-2013, 12:37 AM
Last Post: Michael de Estrada
  [41CL] New Extra Functions version Monte Dalrymple 0 1,084 11-08-2013, 04:32 PM
Last Post: Monte Dalrymple
  HP Prime: in need of help with defining functions Alberto Candel 14 4,185 10-27-2013, 10:48 AM
Last Post: Alberto Candel
  HP Prime spreadsheet functions SanS 0 1,875 10-04-2013, 04:23 AM
Last Post: SanS
  Stats functions on the HP34S Nicholas van Stigt 5 1,950 09-24-2013, 02:45 AM
Last Post: Nick_S
  Trig Functions Howard Owen 11 3,408 09-16-2013, 02:53 PM
Last Post: Fred Lusk
  OT: a math competition site Pier Aiello 0 1,026 09-16-2013, 06:03 AM
Last Post: Pier Aiello
  50g piecewise functions Kurt Fankhauser 6 2,293 09-15-2013, 08:01 PM
Last Post: Kurt Fankhauser
  Computer-scientist functions on HP Prime? Michael O. Tjebben 12 3,470 08-22-2013, 06:59 PM
Last Post: plivesey

Forum Jump: