Post Reply 
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
02  "FZ? "      global LBL name
03  PMTA        for f(z) routine
04  ASTO 02     saved in R02
05  "Z(T)? "    global label name
06  PMTA        for z(t) routine
07  ASTO 00     saved in R00
08  "Z'(T)? "   global LBL name
09  PMTA        for z'(t) routine
10  ASTO 01     saved in R01
11  "R=?"       magnitude of radious    
12  PROMPT      (ignore if not needed)
13  STO 03      saved in R03
14  "T1^T2=?"   integration limits
15  PROMPT      for parameter t    
16  STO 05      t2 saved in R05
17  X<>Y   
18  STO 04      t1 saved in R04
19  LBL C       for repeat use
20  RCL 04      lower limit t1            
21  RCL 05      upper limit t2
22  "ITG"       integrand routine
23  SF 00       flags Imaginary parts
24  FINTG       does the integration
25  STO 06      saves Im(I) in R06
26  X<>Y
27  STO 07      saves D(Im(I))                    
28  CF 00       flags Real parts
29  RCL 04      lower limit t1
30  RCL 05      upper limit t2
31  FINTG       does the integration
32  STO 08      saves Re(I) 
33  X<>Y    
34  STO 09      saves D(Re(I))
35  RCL 07      D(Im(I))
36  X<>Y        D(Re(I))
37  ZENTER^     pushes D in level W
38  RCL 08      Im(I)
39  RCL 06      Re(I)
40  ZAVIEW      shows result
41  TONE 2    
42  RTN         done. 
43  LBL "ITG"   Integrand routine
44  STO 08      saves t in R08
45  XEQ IND 00  calculates z(t)
45  XEQ IND 02  calculates f(z(t))
46  ZSTO 05     saves f(z) in ZR 05
47  RCL 08      recalls t
48  XEQ IND 01  calculates z'(t)
49  ZRC* 05     z'(t).f(z)
50  FS? 00      Imaginary?    
51  X<>Y        yes, take Im part
52  END

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
02  XEQ "ZP"    opportunistic
03  1           adds anchor    
04  +
05  RTN
06  LBL "ZP"    derivative 
07  0           pure imaginary (0+it)
08  ZEXP        exp(it)
09  RCL 03      R
10  ST* Z
11  *           R.exp(it)
12  END         done.

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."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Contour Integral - Marcel - 11-12-2023, 07:22 PM
RE: Contour Integral - Ángel Martin - 02-25-2024, 09:31 AM
RE: Contour Integral - Marcel - 02-25-2024, 08:06 PM
RE: Contour Integral - Ángel Martin - 02-25-2024, 09:57 PM
RE: Contour Integral - Marcel - 02-25-2024, 10:50 PM
RE: Contour Integral - Ángel Martin - 02-26-2024 07:43 AM



User(s) browsing this thread: 1 Guest(s)