Feigenbaum constant calculation: Difference between revisions

m
→‎{{header|REXX}}: changed output text, optimized the DO loops.
m (→‎{{header|REXX}}: changed some comments, increased the number of decimal digits for computations.)
m (→‎{{header|REXX}}: changed output text, optimized the DO loops.)
Line 465:
=={{header|REXX}}==
{{trans|Sidef}}
<lang rexx>/*REXX pgm calculates the Feigenbaurn constantbifurcation velocity tousing any number# of desired decimal digits*/
parse arg digs maxi maxj . /*obtain optional argument from the CL.*/
if maxi=='' | maxi=="," then maxi=15 /*Not specified? Then use the default.*/
Line 475:
d1= 3.2
pad= left('', 3) /*literal for spacing between values. */
say 'Using ' maxj " iterations for " j', with ' digits() " decimal digits.:"
say
say center('i',9,"─") pad center('d',digs+1,"─") /*show a centered title for I and D.*/
Line 481:
do i=2 for maxi-1
a= a1 + (a1 - a2) / d1
do j=1 tofor maxj
x= 0; y= 0
do k=1 tofor 2**i
y= 1 - 2 * y * x
x= a - x**2
Line 497:
{{out|output|text=&nbsp; when using the default inputs:}}
<pre>
Using 10 iterations for J, with 40 decimal digits.:
 
────i──── ────────────────────d────────────────────