Numerical integration/Gauss-Legendre Quadrature: Difference between revisions

m
→‎version 2: changed the wording in the REXX section header.
m (→‎version 2: changed the comments in the REXX section header.)
m (→‎version 2: changed the wording in the REXX section header.)
Line 1,627:
:::*   displays the number of decimal digits that match the exact value
 
<br>The execution speed of this REXX program is largely dependent on the number of decimal digits in &nbsp; '''pi'''. <br>If faster speed is desired, &nbsp; the number of the decimal digits of &nbsp; If'''pi''' faster&nbsp; speedcan is desired,be reduced.
<br>the number of the decimal digits of &nbsp; '''pi''' &nbsp; can be reduced.
 
The use of "vertical bars" is one of the very few times to use leading comments, as there isn't that many situations where there
<br>situations where there exists nested &nbsp; &nbsp; '''do''' &nbsp; &nbsp; loops with different (grouped) sizable indentations, &nbsp; and practically no space on the right side of the statements.
<br>where there's practically no space on the right side of the REXX source statements. &nbsp; It presents a good
<br>It presents a good visual indication of what's what, &nbsp; but it's the dickens to pay when updating the source code.
<lang rexx>/*REXX program does numerical integration using an N-point Gauss─Legendre quadrature rule. */
pi=pi(); digs=length(pi)-1; numeric digits digs; reps=digs%2