Numerical integration/Adaptive Simpson's method: Difference between revisions
Numerical integration/Adaptive Simpson's method (view source)
Revision as of 22:28, 22 May 2023
, 1 year ago→{{header|COBOL}}: Use signed arithmetic throughout which doesn't affect the result of this sample but could affect the results of other integrations.
(Added Oberon-2 before →{{header|ObjectIcon}}) |
(→{{header|COBOL}}: Use signed arithmetic throughout which doesn't affect the result of this sample but could affect the results of other integrations.) |
||
Line 690:
=={{header|COBOL}}==
{{works with|GnuCOBOL|3.1.2.0}}
<syntaxhighlight lang="cobol">
Line 706 ⟶ 703:
data division.
working-storage section.
01 numer picture
01 denom picture
01 numer2 picture
01 a picture
01 b picture
01 tol picture
01 x picture
01 y picture
01 x0 picture
01 y0 picture
01 x1 picture
01 y1 picture
01 x2 picture
01 y2 picture
01 x3 picture
01 y3 picture
01 x4 picture
01 y4 picture
01 ruleval picture
01 ruleval0 picture
01 ruleval1 picture
01 delta picture
01 abs-delta picture
01 tol0 picture
01 tol1 picture
01 delta15 picture
01 stepval picture
01 quadval picture
01 result picture
procedure division.
Line 828 ⟶ 825:
{{out}}
<pre>$ cobc -std=cobol2014 -x adaptive_simpson_task.cob && ./adaptive_simpson_task
0.459697694</pre>
=={{header|Common Lisp}}==
|