Feigenbaum constant calculation: Difference between revisions
Content added Content deleted
Line 1,246: | Line 1,246: | ||
print "Feigenbaum constant calculation:" |
print "Feigenbaum constant calculation:" |
||
print |
print |
||
print format$("{0:-7} {1:-12}","i", " |
print format$("{0:-7} {1:-12} {2}","i", "δ","max j") |
||
for i = 2 to maxit |
for i = 2 to maxit |
||
a=a1+(a1-a2)/d1 |
a=a1+(a1-a2)/d1 |
||
for j = 1 to maxitj {x=0:y=0:for k=1 to 2&^i {y=1@-2@*y*x:x=a-x*x}:a-=x/y} |
for j = 1 to maxitj {x=0:y=0:for k=1 to 2&^i {y=1@-2@*y*x:x=a-x*x}:a-=x/y} |
||
⚫ | |||
d=(a1-a2)/(a-a1) |
d=(a1-a2)/(a-a1) |
||
print format$("{0::-7} {1:10:-12}",i, d) |
print format$("{0::-7} {1:10:-12} {2::-5}",i, d, int(maxitj)) |
||
⚫ | |||
d1=d:a2=a1:a1= a |
d1=d:a2=a1:a1= a |
||
next |
next |
||
} |
} |
||
profiler |
|||
Feigenbaum_constant_calculation 18, .7 |
Feigenbaum_constant_calculation 18, .7 |
||
print timecount |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{out}} |
{{out}} |
||
<pre> |
<pre> |
||
i |
i δ max j |
||
2 3.2185114220 |
2 3.2185114220 13 |
||
3 4.3856775986 |
3 4.3856775986 12 |
||
4 4.6009492765 |
4 4.6009492765 11 |
||
5 4.6551304954 |
5 4.6551304954 10 |
||
6 4.6661119478 |
6 4.6661119478 10 |
||
7 4.6685485814 |
7 4.6685485814 9 |
||
8 4.6690606606 |
8 4.6690606606 8 |
||
9 4.6691715554 |
9 4.6691715554 8 |
||
10 4.6691951560 |
10 4.6691951560 7 |
||
11 4.6692002291 |
11 4.6692002291 6 |
||
12 4.6692013133 |
12 4.6692013133 6 |
||
13 4.6692015458 |
13 4.6692015458 5 |
||
14 4.6692015955 |
14 4.6692015955 4 |
||
15 4.6692016062 |
15 4.6692016062 3 |
||
16 4.6692016085 |
16 4.6692016085 3 |
||
17 4.6692016090 |
17 4.6692016090 2 |
||
18 4.6692016091 |
18 4.6692016091 2 |
||
</pre> |
</pre> |
||