Numerical integration/Adaptive Simpson's method: Difference between revisions
Content added Content deleted
(→{{header|COBOL}}: Use signed arithmetic throughout which doesn't affect the result of this sample but could affect the results of other integrations.) |
(→{{header|COBOL}}: Restore blurb accidently deleted) |
||
Line 690: | Line 690: | ||
=={{header|COBOL}}== |
=={{header|COBOL}}== |
||
{{works with|GnuCOBOL|3.1.2.0}} |
{{works with|GnuCOBOL|3.1.2.0}} |
||
Rather than do recursions, I compute the x-intervals iteratively. No attempt is made to avoid recomputing values of sin(x). |
|||
<syntaxhighlight lang="cobol"> |
<syntaxhighlight lang="cobol"> |