Numerical integration/Gauss-Legendre Quadrature: Difference between revisions
Content added Content deleted
m (→version 3: added REXX version 3.) |
m (→version 2: changed the header (output) information.) |
||
Line 1,918: | Line 1,918: | ||
!.= .; b= 3; a= -b; bma= b - a; bmaH= bma / 2; tiny= '1e-'digs |
!.= .; b= 3; a= -b; bma= b - a; bmaH= bma / 2; tiny= '1e-'digs |
||
trueV= exp(b)-exp(a); bpa= b + a; bpaH= bpa / 2 |
trueV= exp(b)-exp(a); bpa= b + a; bpaH= bpa / 2 |
||
hdr= 'iterate value (with ' digs " decimal digits being used)" |
|||
say ' step ' center("iterative value", digs+3) ' difference' /*show hdr*/ |
|||
say ' step ' center(hdr, digs+3) ' difference' /*show hdr*/ |
|||
sep='──────' copies("─", digs+3) '─────────────'; say sep /* " sep*/ |
|||
do #=1 until dif>0; p0z= 1; p0.1= 1; p1z= 2; p1.1= 1; p1.2= 0; ##= # + .5; r.= 0 |
do #=1 until dif>0; p0z= 1; p0.1= 1; p1z= 2; p1.1= 1; p1.2= 0; ##= # + .5; r.= 0 |
||
Line 1,967: | Line 1,968: | ||
{{out|output|text= when using the default inputs:}} |
{{out|output|text= when using the default inputs:}} |
||
<pre> |
<pre> |
||
step |
step iterate value (with 82 decimal digits being used) difference |
||
────── ───────────────────────────────────────────────────────────────────────────────────── ───────────── |
────── ───────────────────────────────────────────────────────────────────────────────────── ───────────── |
||
2 17.48746464105556896436068404624494584211542841793491350914872470595379166623788825 -2.5483 |
2 17.48746464105556896436068404624494584211542841793491350914872470595379166623788825 -2.5483 |