Numerical integration/Gauss-Legendre Quadrature: Difference between revisions

m
→‎version 2: used more idiomatic code for computing the number of decimal digits of pi.
m (→‎version 3, more precision: changed wording in the REXX section header.)
m (→‎version 2: used more idiomatic code for computing the number of decimal digits of pi.)
Line 2,312:
<br>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 length(.); numeric digits digs; reps= digs % 2
 
!.= .; b= 3; a= -b; bma= b - a; bmaH= bma / 2; tiny= '1e-'digs
trueV= exp(b)-exp(a); bpa= b + a; bpaH= bpa / 2