Runge-Kutta method: Difference between revisions

m
Shortened overlong lines. No change to executable code.
(Added solution for EDSAC.)
m (Shortened overlong lines. No change to executable code.)
Line 627:
with the scaling chosen here, m = 5.
Variables y are stored in n consecutive long locations, the last of which is aD.
Scaled derivatives (2^m)hy' are stored in n consecutive long locations, the last of which is bD.
G1 uses working variables stored in n consecutive long locations, the last of which is cD.
d = address of user-supplied auxiliary subroutine, which calculates the (2^m)hy'.
 
For convenience, keep G1 and its storage together. ChooseStart a base address,at (say) 400, and place:
variables y at 400D, 402D;
scaled derivatives at 404D, 406D;
Line 660:
Values are: 0.001, initial value of y
(2^23)/(10^7) and 25/(2^10) for use in calculations
0.5/(10^9) for rounding to 9 d.p. (EDSAC print routine P1 doesn't do this)]
GKT20FVDL8FA40DUDTFI40FA40FS39FG@S2FG23FA5@T5@E4@E13Z
T#C
Line 690:
[2] !F @F &F [space, carriage return, line feed,]
[5] K4096F [null char]
[6] P100F [constant: numbernr of Runge-Kutta steps (in address field)]
[7] PF [negative count of Runge-Kutta steps]
[8] P10F [constant: number of steps between printed values]
Line 741:
[Library subroutine G1 for Runge-Kutta process. 66 locations, even address.]
E25K T12G
GKT4#ZH682DT6#ZPNT12#Z!1405DT14#ZTHT16#ZT2HTZA3FT61@A31@G63@&FT6ZPNT8ZMMO&H4@A20@E23@FT6ZPN
T8ZMMO&H4@A20@E23@T14ZAHT16ZA2HT18ZH12#@S12#@T12#@E28@H4#@T4DUFS38@A25@T38@S6#@A16#@U46#@A8@U37@A9@U55@
A25@T38@S6#@A16#@U46#@A8@U37@A9@U55@A24@T39@ZFR1057#@ZFYFU6DV6DRLYF
A24@T39@ZFR1057#@ZFYFU6DV6DRLYFUDZFZFADLDADLLS6DN4DYFZFA46#@S14#@G29@A65@S11@ZFA35@U65@GXZF
UDZFZFADLDADLLS6DN4DYFZFA46#@S14#@G29@A65@S11@ZFA35@U65@GXZF
 
[Replacement for library routine S2 (square root). 38 locations, even address.
113

edits