Anonymous user
Numerical integration: Difference between revisions
→{{header|ALGOL 68}}: fix right rect to go all the way to b, not b-h
(→{{header|Perl 6}}: update to new testing regime) |
(→{{header|ALGOL 68}}: fix right rect to go all the way to b, not b-h) |
||
Line 188:
=={{header|ALGOL 68}}==
<lang algol68>MODE F = PROC(LONG REAL)LONG REAL;
Line 216 ⟶ 215:
LONG REAL sum:= 0;
LONG REAL x:= a + h;
WHILE x <= b
sum := sum + (h * f(x));
x +:= h
|