Feigenbaum constant calculation: Difference between revisions

Content added Content deleted
(Added Fōrmulæ)
Line 1,295: Line 1,295:
15 4.66920161
15 4.66920161
</pre>
</pre>

=={{header|Visual Basic .NET}}==
{{trans|C#}}
<lang vbnet>Module Module1

Sub Main()
Dim maxIt = 13
Dim maxItJ = 10
Dim a1 = 1.0
Dim a2 = 0.0
Dim d1 = 3.2
Console.WriteLine(" i d")
For i = 2 To maxIt
Dim a = a1 + (a1 - a2) / d1
For j = 1 To maxItJ
Dim x = 0.0
Dim y = 0.0
For k = 1 To 1 << i
y = 1.0 - 2.0 * y * x
x = a - x * x
Next
a -= x / y
Next
Dim d = (a1 - a2) / (a - a1)
Console.WriteLine("{0,2:d} {1:f8}", i, d)
d1 = d
a2 = a1
a1 = a
Next
End Sub

End Module</lang>
{{out}}
<pre> i d
2 3.21851142
3 4.38567760
4 4.60094928
5 4.65513050
6 4.66611195
7 4.66854858
8 4.66906066
9 4.66917155
10 4.66919515
11 4.66920026
12 4.66920098
13 4.66920537</pre>


=={{header|zkl}}==
=={{header|zkl}}==