Feigenbaum constant calculation: Difference between revisions
Content added Content deleted
(Amended template for converting this to a draft task.) |
|||
Line 1: | Line 1: | ||
{{draft task}} |
|||
{{Feigenbaum constant calculation}} |
|||
Calculate the Feigenbaum constant. See details: [https://en.wikipedia.org/wiki/Feigenbaum_constants Feigenbaum constant] |
Calculate the Feigenbaum constant. See details: [https://en.wikipedia.org/wiki/Feigenbaum_constants Feigenbaum constant] |
||
=={{header|Ring}}== |
=={{header|Ring}}== |
Revision as of 21:18, 20 April 2018
Feigenbaum constant calculation is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
Calculate the Feigenbaum constant. See details: Feigenbaum constant
Ring
<lang ring>
- Project : Feigenbaum constant calculation
- Date : 2018/04/20
- Author : Gal Zsolt [~ CalmoSoft ~]
- Email : <calmosoft@gmail.com>
decimals(8) see "Feigenbaum constant calculation:" + nl maxIt = 13 maxItJ = 10 a1 = 1.0 a2 = 0.0 d1 = 3.2 see "i " + "d" + nl for i = 2 to maxIt
a = a1 + (a1 - a2) / d1 for j = 1 to maxItJ x = 0 y = 0 for k = 1 to pow(2,i) y = 1 - 2 * y * x x = a - x * x next a = a - x / y next d = (a1 - a2) / (a - a1) if i < 10 see "" + i + " " + d + nl else see "" + i + " " + d + nl ok d1 = d a2 = a1 a1 = a
next </lang> Output:
Feigenbaum constant calculation: 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