以下のリストのように、複素関数の実数部と虚数部はサブルーチン化しておき、本体プログラムより必要に応じて DEF FN コマンドで呼び出している。関数は随時追加している。
-------------------------------------------------------
10000 REM KOSHIKI FILE NAME KOSHIKI ,Ver.4
10010 EE=2.718281# :P=3.141592#
10020 DEF FNSINH(X)=.5#*(EE^X-EE^(-X))
10030 DEF FNCOSH(X)=.5#*(EE^X+EE^(-X))
10040 REM Z^n
10050 DEF FNR2(X,Y)=X^2-Y^2
10060 DEF FNI2(X,Y)=2*X*Y
10070 DEF FNR3(X,Y)=X*(X^2-3*Y^2)
10080 DEF FNI3(X,Y)=Y*(3*X^2-Y^2)
10090 DEF FNR4(X,Y)=FNR2(X,Y)^2-FNI2(X,Y)^2
10100 DEF FNI4(X,Y)=2*FNR2(X,Y)*FNI2(X,Y)
10110 DEF FNR5(X,Y)=FNR2(X,Y)*FNR3(X,Y)-FNI2(X,Y)*FNI3(X,Y)
10120 DEF FNI5(X,Y)=FNR2(X,Y)*FNI3(X,Y)+FNI2(X,Y)*FNR3(X,Y)
10130 DEF FNR6(X,Y)=FNR3(X,Y)^2-FNI3(X,Y)^2
10140 DEF FNI6(X,Y)=2*FNR3(X,Y)*FNI3(X,Y)
10150 DEF FNR7(X,Y)=X*FNR6(X,Y)-Y*FNI6(X,Y)
10160 DEF FNI7(X,Y)=Y*FNR6(X,Y)+X*FNI6(X,Y)
10170 DEF FNR8(X,Y)=FNR6(X,Y)*FNR2(X,Y)-FNI6(X,Y)*FNI2(X,Y)
10180 DEF FNI8(X,Y)=FNR6(X,Y)*FNI2(X,Y)+FNI6(X,Y)*FNR2(X,Y)
10190 DEF FNR9(X,Y)=FNR6(X,Y)*FNR3(X,Y)-FNI6(X,Y)*FNI3(X,Y)
10200 DEF FNI9(X,Y)=FNR6(X,Y)*FNI3(X,Y)+FNI6(X,Y)*FNR3(X,Y)
10210 DEF FNR10(X,Y)=FNR6(X,Y)*FNR4(X,Y)-FNI6(X,Y)*FNI4(X,Y)
10220 DEF FNI10(X,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370 DEF FNCOSHI(X,Y)=.5#*SIN(Y)*(EE^X-EE^(-X))
10380 REM Sin(Sin Z)
10390 DEF FNSINSINR(X,Y)=SIN(FNSINR(X,Y))*FNCOSH(FNSINI(X,Y))
10400 DEF FNSINSINI(X,Y)=COS(FNSINR(X,Y))*FNSINH(FNSINI(X,Y))
10410 REM Cos(Sin Z)
10420 DEF FNCOSSINR(X,Y)=COS(FNSINR(X,Y))*FNCOSH(FNSINI(X,Y))
10430 DEF FNCOSSINI(X,Y)=-SIN(FNSINR(X,Y))*FNSINH(FNSINI(X,Y))
10440 REM e^(Z^2)
10450 DEF FNEZR2(X,Y)=(EE^(FNR2(X,Y)))*COS(FNI2(X,Y))
10460 DEF FNEZI2(X,Y)=(EE^(FNR2(X,Y)))*SIN(FNI2(X,Y))
10470 REM e^(Z^3)
10480 DEF FNEZR3(X,Y)=(EE^(FNR3(X,Y)))*COS(FNI3(X,Y))
10490 DEF FNEZI3(X,Y)=(EE^(FNR3(X,Y)))*SIN(FNI3(X,Y))
10500 REM e^(Z^4)
10510 DEF FNEZR4(X,Y)=(EE^(FNR4(X,Y)))*COS(FNI4(X,Y))
10520 DEF FNEZI4(X,Y)=(EE^(FNR4(X,Y)))*SIN(FNI4(X,Y))
10530 REM e^(Z^5)
10540 DEF FNEZR5(X,Y)=(EE^(FNR5(X,Y)))*COS(FNI5(X,Y))
10550 DEF FNEZI5(X,Y)=(EE^(FNR5(X,Y)))*SIN(FNI5(X,Y))
10560 REM e^(Z^6)
10570 DEF FNEZR6(X,Y)=(EE^(FNR6(X,Y)))*COS(FNI6(X,Y))
10580 DEF FNEZI6(X,Y)=(EE^(FNR6(X,Y)))*SIN(FNI6(X,Y))
10590 REM e^(Z^7)
10600 DEF FNEZR7(X,Y)=(EE^(FNR7(X,Y)))*COS(FNI7(X,Y))
10610 DEF FNEZI7(X,Y)=(EE^(FNR7(X,Y)))*SIN(FNI7(X,Y))
10620 REM e^(Z^8)
10630 DEF FNEZR8(X,Y)=(EE^(FNR8(X,Y)))*COS(FNI8(X,Y))
10640 DEF FNEZI8(X,Y)=(EE^(FNR8(X,Y)))*SIN(FNI8(X,Y))
10650 REM e^(Z^9)
10660 DEF FNEZR9(X,Y)=(EE^(FNR9(X,Y)))*COS(FNI9(X,Y))
10670 DEF FNEZI9(X,Y)=(EE^(FNR9(X,Y)))*SIN(FNI9(X,Y))
10680 REM e^(Z^10)
10690 DEF FNEZR10(X,Y)=(EE^(FNR10(X,Y)))*COS(FNI10(X,Y))
10700 DEF FNEZI10(X,Y)=(EE^(FNR10(X,Y)))*SIN(FNI10(X,Y))
10710 REM e^(SIN Z)
10720 DEF FNEZSINR(X,Y)=(EE^(FNSINR(X,Y)))*COS(FNSINI(X,Y))
10730 DEF FNEZSINI(X,Y)=(EE^(FNSINR(X,Y)))*SIN(FNSINI(X,Y))
10740 REM e^(SINH Z)
10750 DEF FNEZSINHR(X,Y)=EE^(FNSINHR(X,Y))*COS(FNSINHI(X,Y))
10760 DEF FNEZSINHI(X,Y)=EE^(FNSINHR(X,Y))*SIN(FNSINHI(X,Y))
10780 REM e^(COS Z)
10790 DEF FNEZCOSR(X,Y)=(EE^(FNCOSR(X,Y)))*COS(FNCOSI(X,Y))
10800 DEF FNEZCOSI(X,Y)=(EE^(FNCOSR(X,Y)))*SIN(FNCOSI(X,Y))
10810 REM e^(COSH Z)
10820 DEF FNEZCOSHR(X,Y)=EE^(FNCOSHR(X,Y))*COS(FNCOSHI(X,Y))
10830 DEF FNEZCOSHI(X,Y)=EE^(FNCOSHR(X,Y))*SIN(FNCOSHI(X,Y))
10840 RETURN----------------------------------------