Numerical integration: Difference between revisions

(→‎{{header|Perl 6}}: correct numerous errors, general cleanup)
Line 81:
trace(simpson(f1, -1, 2 ,4 ));
</lang>
=={{header|Ada}}==
 
{{incorrect|Ada|Right_Rect stops one H too soon; Mid_Rect doesn't sample at midpoints but merely recreates Trapezium differently.}}
 
This solution creates a generic package into which the function F(X) is passed during generic instantiation. The first part is the package specification. The second part is the package body.
 
Line 179 ⟶ 182:
 
end Integrate;</lang>
 
=={{header|ALGOL 68}}==
<lang algol68>MODE F = PROC(LONG REAL)LONG REAL;
Anonymous user