Bernstein basis polynomials: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 21: Line 21:
[[#ALGOL_60|ALGOL 60]] and [[#Python|Python]] implementations are provided as initial examples. The latter does the optional monomial-basis evaluations.
[[#ALGOL_60|ALGOL 60]] and [[#Python|Python]] implementations are provided as initial examples. The latter does the optional monomial-basis evaluations.


You can use the following algorithms. They are written in unambiguous Algol 60 reference language instead of a made up pseudo-language. The [[#ALGOL_60|ALGOL 60]] example was necessary to check my work, but these reference versions are in the actual standard language.
You can use the following algorithms. They are written in unambiguous Algol 60 reference language instead of a made up pseudo-language. The [[#ALGOL_60|ALGOL 60]] example was necessary to check my work, but these reference versions are in the actual standard language designed for printing algorithms.
'''procedure''' ''tobern2'' (''a0'', ''a1'', ''a2'', ''b0'', ''b1'', ''b2'');
'''procedure''' ''tobern2'' (''a0'', ''a1'', ''a2'', ''b0'', ''b1'', ''b2'');
'''value''' ''a0'', ''a1'', ''a2''; '''comment''' pass by value;
'''value''' ''a0'', ''a1'', ''a2''; '''comment''' pass by value;