Contour Integral
|
11-12-2023, 07:22 PM
Post: #1
|
|||
|
|||
Contour Integral
Hi!
I upload a document with the same program from the Advanced Functions Handbook for the HP 15C to approximate the Contour Integral of a complex Function F(z). The same example function is also program under the label FZ. The evaluation take 17 minutes 11 seconds! Brian Zilli do a general form with the same example function for the HP 15C. The HP 41C can do the math like the HP 15C! (With more time...) Marcel |
|||
02-25-2024, 09:31 AM
(This post was last modified: 03-03-2024 01:40 PM by Ángel Martin.)
Post: #2
|
|||
|
|||
RE: Contour Integral
Thanks for putting this one together, nicely done indeed.
I have made a few tweaks that save some bytes and eliminate one global label. Plus also used the 41Z functions instead of the FOCAL routines from the Advantage, which make the code better legible and reduces execution time. The resulting code is posted below. This application is somewhat limited to (non-horizontal) straight line segments for contours, I've been musing about a general-purpose implementation using the residues theorem and analytical functions but so far the challenge is not resolved... would like to hear if anybody has some suggestions. Code: 01 LBL “ZLITG” Cpx. Line Intg. and the complex function example: Code: 01 LBL “FZ” Usage: set the desired accuracy (i.e. FIX 3), enter the complex function LABEL in ALPHA (i.e. "FZ"), and the lower and upper complex limits in the complex stack (i.e. 0, ENTER^, 1, ZENTER^, 6, ENTER^, 1). Then execute the program (i.e. XEQ "ZLITG") Result in FIX 6: -0.324350+J0.382053 Best, ÁM "To live or die by your own sword one must first learn to wield it aptly." |
|||
02-25-2024, 08:06 PM
Post: #3
|
|||
|
|||
RE: Contour Integral
Hi Ángel!
Thank you for your comment! Can you post the running time for your version with the same exemple.. Marcel |
|||
02-25-2024, 09:57 PM
Post: #4
|
|||
|
|||
RE: Contour Integral
Hi Marcel, I haven't used it on a real machine yet, but on V41 with default settings it took 4 min and 22 sec with a FIX3.
Using TURBO however it takes just above 17 seconds - but of course that would be cheating :=) BTW I just noticed your mention to Brian Zilli - can you elaborate on that? I'd be curious to check other examples as well. Cheers, ÁM "To live or die by your own sword one must first learn to wield it aptly." |
|||
02-25-2024, 10:50 PM
(This post was last modified: 02-25-2024 10:51 PM by Marcel.)
Post: #5
|
|||
|
|||
RE: Contour Integral | |||
02-26-2024, 07:43 AM
(This post was last modified: 02-28-2024 06:56 PM by Ángel Martin.)
Post: #6
|
|||
|
|||
RE: Contour Integral
(02-25-2024 10:50 PM)Marcel Wrote: This post. Thanks, I had completely missed that thread and it's well worth a detailed read. Here's my take at the updated programs, using an initial data entry section and a runtime execution entry point at LBL C (*) PMTA is available in the OS/X modules Code: 01 LBL "ZCNTR" main driver program as well as the parameterized curves z(t) and z'(t) - The routine for f(z) is the same one used in the initial program, see the second post in this thread. Code: 01 LBL "ZT" parameterized z The results obtained are the same as those presented in Brian Zilli's paper. Enjoy! "To live or die by your own sword one must first learn to wield it aptly." |
|||
08-12-2024, 11:20 AM
Post: #7
|
|||
|
|||
RE: Contour Integral
@Ángel_Martin, this isn't quite the right place for this post but the thread subject matter is close enough.
I just wanted to say thanks once again for the latest of your extensions to the SandMath and 41Z ROMs. The Contour ROM is another delight. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)