Bernstein basis polynomials: Difference between revisions
Content added Content deleted
mNo 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 designed for the printing of algorithms. |
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 the printing of algorithms. (''Side note: It was just the other day I had to fix someone's pseudocode for a task. Pseudocode is ambiguous and prone to error. And few languages are as simple and easy for anyone to understand as is Algol 60.) |
||
'''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; |