Numerical integration: Difference between revisions

→‎{{header|ALGOL 68}}: fixed mid rect, which was still wrong, sigh
(→‎{{header|ALGOL 68}}: fix right rect to go all the way to b, not b-h)
(→‎{{header|ALGOL 68}}: fixed mid rect, which was still wrong, sigh)
Line 232:
LONG REAL x:= a;
WHILE x <= b - h DO
sum := sum + (h / 2) * (f(x) + f(xh +/ h)2);
x +:= h
OD;
Anonymous user