The Museum of HP Calculators

HP Forum Archive 19

 New Version of the 41ZMessage #1 Posted by Angel Martin on 25 July 2010, 4:42 a.m. A new version of the 41Z module is available and should be posted at TOS in a few days. In addition to some bug fixing and code optimization, version 5C includes programs to calculate the Lambert W, and Bessel functions for complex variable and in all cases (yes, including negative and positive integer orders!). Don't expect blazing performance on the coconut CPU (use V41 for that!) - but of course accurate results :) I also separated the buffer functions into their own dedicated ROM, also available. That freed up some space on the 41Z module to add the new functions. If used, the buffer module should be loaded in the next contiguous page after the 41Z. It's basically a diagnostics facility so there's no point in having it always on-line (which would turn the 41Z into another 12k ROM). Your feedback and suggestions is welcome. Hope you enjoy it as much as I did programming them. Cheers, 'AM

 Re: New Version of the 41ZMessage #2 Posted by Angel Martin on 25 July 2010, 6:22 a.m.,in response to message #1 by Angel Martin In case you're curious, here are the formulae used in the Bessel functions implementation: Orders can be either real or complex. I use an iterative algorithm for J (and I) which is valid for Re(z)>0 and all orders but negative integers due to the Gamma singularities. J(w,z) = SUM {U(k)|k=1,2,….} * (z/2)^w / G(w+1) U(k) = -U(k-1) * (z/2)^2 / k(k+w) U(0) = 1 Then I use the following two continuation rules: 1. for negative integers, J(-n,z) = (-1)^n * J(n,z) 2. for Re(z)<0, J(w,-z) = (-z)^w * (z)^(-w) * J(w,z) For non-integer orders, Y and K are derived from J and I using the well-known formulas involving sin(pi z) and cos(pi z). Y(w,z) = [ J(w,z) cos(w(pi)) - J(-w,z) ] / sin(w(pi)) K(w,z) = (pi/2) [ I(-w,z) - I(w,z) ] / sin(w(pi)) For integer orders however those don't work, and I have to resort to the more elaborate summations, as follows: pi* Y(n,z) = 2[geu + Ln z/2] J(n,z) – SUM{(-1)^k fk(n,z)} – SUM{gk(n,z)} (-1)^n+1 * 2 K(n,z) = 2 [geu + Ln z/2] I(n,z) – SUM{fk(n,z)} – (-1)^n * SUM{(-1)^k * gk(n,z)} where: gk(n,x) = (z/2)^2k-n (n-k-1)! / k! ; k=0,2,…(n-1) fk(n,z) = (z/2)^2k+n [H(k) + H(n+k)] / [k! (n+k)!] ; k=0,1,2,….. H(n) = SUM {1/k}, k=1,2...n Hope this helps. Edited: 25 July 2010, 6:24 a.m.

 Re: New Version of the 41ZMessage #3 Posted by Namir on 25 July 2010, 10:13 a.m.,in response to message #2 by Angel Martin Sounds like a cool update to an already cool module. Unfortunately my therapist highly recommended that I stay away from "imaginary" friends AND numbers and stick with reality and real numbers. :-) Namir

 Re: New Version of the 41ZMessage #4 Posted by Angel Martin on 25 July 2010, 3:15 p.m.,in response to message #3 by Namir Quote: Unfortunately my therapist highly recommended that I stay away from "imaginary" friends AND numbers mmm, that's strange, Are you sure you didn't imagine it? Cheers, 'AM.

 Dr. Michael Meyers... calling Dr. Michael Meyers...Message #5 Posted by Vieira, Luiz C. (Brazil) on 26 July 2010, 12:22 a.m.,in response to message #3 by Namir 8^)

 Re: Dr. Michael Meyers... calling Dr. Michael Meyers...Message #6 Posted by Michael Meyer on 27 July 2010, 7:29 p.m.,in response to message #5 by Vieira, Luiz C. (Brazil) I guess sometimes we need to have an "imaginary part" to understand our "real part"....

 Re: New Version of the 41ZMessage #7 Posted by Vieira, Luiz C. (Brazil) on 25 July 2010, 9:31 a.m.,in response to message #1 by Angel Martin HI, Angel; congratulations, great brain job! And thanks, o'course! As soon as it is available I'll download and run it. For these days I'm delving into a 3421 unit and because I intend using it for some experiments, vectors and complex calculus are always welcome when dealing with AC measuring and related stuff. Gracias! Luiz (Brazil)

 Re: New Version of the 41ZMessage #8 Posted by Angel Martin on 25 July 2010, 3:18 p.m.,in response to message #7 by Vieira, Luiz C. (Brazil) Not a problem Luiz, hope your adventures w/ the AC unit fare well... If I'd only had the 41Z when I was in eng. school... although it may have ruined all my exams so on reflection it's probably better that I didn't. Cheers, 'AM

 Ditto!Message #9 Posted by Vieira, Luiz C. (Brazil) on 26 July 2010, 12:20 a.m.,in response to message #8 by Angel Martin I had an HP41C with one memory module, and later I bought an HP15C. This was 'heavy army' at that time (80´s), but the fact that I was so desperate to use them led me to study harder, mostly to write the programs for the HP41C. If, at that time, I had access to all information I have now about the HP41´s internals and had the chance to build some of the stuff I see now, chances are that I'd have many subjects flunk... (is this construction correct? Never used the verb 'flunk' before...) Cheers. Luiz (Brazil)

 Re: Ditto!Message #10 Posted by db (martinez, ca.) on 26 July 2010, 12:40 a.m.,in response to message #9 by Vieira, Luiz C. (Brazil) Luiz; Since you asked; it's flunked, with the ed sounding like a lone t. Your english has improved from good (better than New Yorkers) to usually idiomatically correct in the last few years. Are you still studying? I've had cause to use that verb, but never in the low level math, surveying and physics classes i took, just in waste of time classes like "critical thinking" (a.k.a. "agree with teacher") and "logic" (a.k.a. "forget Boole, let's all worship Aristotle for an entire semester").

 Re: New Version of the 41ZMessage #11 Posted by Antoine M. Couëtte on 25 July 2010, 12:25 p.m.,in response to message #1 by Angel Martin Enhorabuena Angel ! Congrats again Angel ! Will 41Z run on either HP41X/Y/Z by HrastProgrammer and on Emu41 by Jean-François Garnier ? I think it should and will ... Thank you for your kind attention and reply, and Best Regards from Antoine M. "Kermit" Couëtte

 Re: New Version of the 41ZMessage #12 Posted by Angel Martin on 25 July 2010, 3:13 p.m.,in response to message #11 by Antoine M. Couëtte Quote: Will 41Z run on either HP41X/Y/Z by HrastProgrammer and on Emu41 by Jean-François Garnier ? I think so, there's not anything esoteric about the 41Z approach after all. It runs like a champ on V41 and i41CX... Thanks for the praise, it's good to share things with appreciative folks like you.

Go back to the main exhibit hall