airy ai and bi functions
06-02-2017, 10:02 AM
Post: #4
 Gerald H Senior Member Posts: 1,414 Joined: May 2014
RE: airy ai and bi functions
You may like some of the modifications I incorporated in your programmes for the 38G, including my attempt to improve accuracy.

Code:
 AIRYAI Ans►Z: IF ABS(Ans)<7 THEN RUN AIRYF: Ans*.355028053888►A: RUN AIRYG: A-Ans*.258819403793:  ELSE IF Z>=0 THEN (2/3)*Z^1.5►S: 1►Q: FOR K=1 TO 48 STEP 1;  Q►O: K: RUN AIRYC: Q+IFTE(K MOD 2,-1,1)*Ans*S^(-K)►Q: IF O==Q THEN BREAK: END: END: .282094791774/Z^.25/e^S*Q: ELSE -Z►Z: (2/3)*Z^1.5►S: 1►Q: RUN AIRYC: Ans/S►R: FOR K=1 TO 24 STEP 1;  Q►O: R►P: IFTE(K MOD 2,-1,1)►L: 2*K: RUN AIRYC: Q+L*Ans*S^(-2*K)►Q: 2*K+1: RUN AIRYC: R+L*Ans*S^(-2*K-1)►R: IF O==Q AND P==R THEN BREAK: END: END: S+π/4: (.564189583547/Z^.25)*(SIN(Ans)*Q-COS(Ans)*R): END:  END: MSGBOX "Ai: "Ans:  AIRYBI Ans►Z: IF ABS(Ans)<7 OR Z>=0 THEN RUN AIRYF: Ans*.355028053888►A: RUN AIRYG: (A+Ans*.258819403793)*√3: ELSE -Z►Z: (2/3)*Z^1.5►S: 1►Q: RUN AIRYC: Ans/S►R: FOR K=1 TO 24 STEP 1;  Q►O: R►P: IFTE(K MOD 2,-1,1)►L: 2*K: RUN AIRYC: Q+L*Ans*S^(-2*K)►Q: 2*K+1: RUN AIRYC: R+L*Ans*S^(-2*K-1)►R: IF O==Q AND P==R THEN BREAK: END: END: S+π/4: (.564189583548/Z^.25)*(SIN(Ans)*R+COS(Ans)*Q): END: MSGBOX "Bi: "Ans:  AIRYC Ans►M: 1/(M!*216^M): FOR J=0 TO 2*M-1 STEP 1; Ans*(2*M+2*J+1): END:  AIRYF 1►T: 0►U: 1►Q: FOR K=1 TO 80 STEP 1;  3*K►P: Q*(P-2)►Q: T+Q*Z^P/P!►T: IF T==U THEN BREAK: END: T►U: END: AIRYG Z►T: 0►U: 1►Q: FOR K=1 TO 80 STEP 1; 3*K+1►P: Q*(P-2)►Q: T+Q*Z^P/P!►T: IF T==U THEN BREAK: END: T►U: END:
 « Next Oldest | Next Newest »

 Messages In This Thread airy ai and bi functions - roadrunner - 07-20-2015, 08:47 PM RE: airy ai and bi functions - Gerald H - 02-07-2017, 12:08 PM RE: airy ai and bi functions - roadrunner - 06-01-2017, 11:23 PM RE: airy ai and bi functions - Gerald H - 06-02-2017 10:02 AM

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