Anonymous user
Runge-Kutta method: Difference between revisions
m
→{{header|ALGOL 68}}
Line 100:
INT num points = ENTIER ((x1 - x0) / dx + 0.5); CO Add 0.5 for rounding errors. CO
[0:num points] REAL y; y[0] := y0; CO Grid and starting point.CO
PROC dy by
FOR i TO num points
DO
y[i] := rk4 (dy by
OD;
print ((" x true y calc y relative error", newline));
|