wscott@EN.ECN.PURDUE.EDU (Wayne H Scott) (02/21/90)
This is a function I wrote to aid in my study of FM signal modulation. It computes the bessel function. It expects n and x to be on the stack and it returns the result of the bessel function. Note it is recursive so it should be named J or change the one reference to this name within the program. To anyone who enjoys HP28 optimization please work on this. I know it can be much faster but I just haven't had the time. J << -> n x << << IF n 0 < THEN n NEG x J n 2 MOD 2 * 1 - * NEG ELSE IF x 0 == THEN n 0 == ELSE 17.1032 .2639 n * + .6487 x ABS * + .0018 n * x ABS * - .6457 n x ABS MAX * + .5 + FLOOR 2 / CEIL 2 * 0 1.e-50 DUP DUP 2 * 0 0 -> m bkp1 tiny bk t bn bkp2 << m 1 - 0 FOR k bkp1 'bkp2' STO bk 'bkp1' STO 2 k 1 + * bkp1 * x / bkp2 - 'bk' STO IF k n == bk THEN bk 'bn' STO END IF k 0 > k 2 MOD 0 == AND THEN t 2 bk * + 't' STO END if k 0 == THEN t bk + 't' STO END -1 STEP bn t / >> END END >> >> Ported from MatLab librarys _______________________________________________________________________________ Wayne Scott | INTERNET: wscott@en.ecn.purdue.edu Electrical Engineering | BITNET: wscott%ea.ecn.purdue.edu@purccvm Purdue University | UUCP: {purdue, pur-ee}!en.ecn.purdue.edu!wscott
brian@fog.ann-arbor.mi.us (Brian S. Schang) (03/29/91)
Does anybody have any programs for the HP48SX that calculate the values of Bessel functions that he/she would be willing to share? Specifically, I'm looking for programs that will calculate: J (x) Y (x) m m Thanks in advance! -- Brian S. Schang N8FOG brian@fog.ann-arbor.mi.us 46131 Academy Drive schang@caen.engin.umich.edu Plymouth, MI 48170-3519