Talk:Feigenbaum constant calculation

From Rosetta Code

Description needed[edit]

The task would be improved if there was a clearer description of how to calculate the constant given than the hidden, math-centric Wikipedia text. The target audience are programmers, and a I think a given method of calculation would allow for better comparison of solutions. Paddy3118 (talk) 10:47, 18 September 2018 (UTC)


true value of Feigenbaum's constant[edit]

Since the true value of Feigenbaum's constant isn't shown here on this Rosetta Code task, I added the displaying of it in the REXX example,   along with the displaying of the number of correct decimal digits for each   (i)   iteration.   -- Gerard Schildberger (talk) 06:28, 19 September 2018 (UTC)

degree of accuracy with more precision during computing[edit]

I was experimenting with increasing the number of decimal digits (precision) with the REXX example.


For   10   decimal digits:

Using  10  iterations for  maxJ,  with  10  decimal digits:

            correct
────i──── ──digits─── ─────d─────
    2          0      3.218511415
    3          1      4.385677676
    4          2      4.600948689
    5          2      4.65513455
    6          3      4.666093465
    7          3      4.668532629
    8          4      4.669075367
    9          3      4.661840596
   10          1      4.716700473
   11          1      4.865131579
   12          0      33.77777778
   13          0      -0.004986149584
   14          0      -0.004986146524
   15          0      -0.003986261738
   16          0      -0.0178044264
   17          0      -0.169923567
   18          0      -0.2743411539
   19          0      -0.2916348706
   20          0      -0.2917038238
   21          0      -1.282351899
   22          0      -4.760586838
   23          0      -3.741736856
   24          0      -3.754125525
   25          0      -0.09190415307

         true value=  4.669201609

For   20   decimal digits:

Using  10  iterations for  maxJ,  with  20  decimal digits:

            correct
────i──── ──digits─── ──────────d──────────
    2          0      3.2185114220380879119
    3          1      4.3856775985683390848
    4          2      4.6009492765380753389
    5          2      4.655130495391980231
    6          3      4.6661119478285698075
    7          3      4.668548581446857975
    8          4      4.6690606606480870955
    9          4      4.6691715553802316722
   10          4      4.6691951560255308919
   11          6      4.6692002291211212557
   12          7      4.6692013127842230631
   13          7      4.6692015485437548544
   14          9      4.6692016005633566634
   15          7      4.6692015330312737776
   16          6      4.6692023823679005527
   17          4      4.6691972211443265305
   18          6      4.6692074719138228098
   19          4      4.6694187571119124281
   20          3      4.6688146048792985728
   21          2      4.6712853146119749655
   22          2      4.6215243376551173582
   23          2      4.6832793670928330607
   24          0      1.6761036199854529178
   25          0      1.3068879789412108804

         true value=  4.6692016091029906719

For   30   decimal digits:

Using  10  iterations for  maxJ,  with  30  decimal digits:

            correct
────i──── ──digits─── ───────────────d───────────────
    2          0      3.21851142203808791227050453077
    3          1      4.3856775985683390857449485682
    4          2      4.60094927653807535781169469969
    5          2      4.65513049539198013648625498649
    6          3      4.66611194782857138833121364654
    7          3      4.66854858144684094804454708811
    8          4      4.66906066064826823913257549468
    9          4      4.6691715553795113888859465442
   10          4      4.66919515603001717402161720542
   11          6      4.66920022908685649793393149233
   12          7      4.66920131329420417113719511412
   13          7      4.66920154578090670783369507315
   14          7      4.66920159553749390966169074155
   15          9      4.66920160619815215840788706632
   16          9      4.66920160848080435144581223484
   17          9      4.66920160896974538458267849027
   18         10      4.66920160907444981238909862845
   19         10      4.66920160909687888294310165196
   20         12      4.66920160910169069039564432665
   21         12      4.66920160910308071307717015249
   22         10      4.66920160909753242748934828099
   23         11      4.66920160912480010881711811908
   24         12      4.66920160910412904696305071057
   25          9      4.66920160831045435278064326969

         true value=  4.66920160910299067185320382047

For   40   decimal digits:

Using  10  iterations for  maxJ,  with  40  decimal digits:

            correct
────i──── ──digits─── ────────────────────d────────────────────
    2          0      3.218511422038087912270504530742813256018
    3          1      4.385677598568339085744948568775522346173
    4          2      4.600949276538075357811694698623834984934
    5          2      4.655130495391980136486254995856898818963
    6          3      4.666111947828571388331213696711776471107
    7          3      4.668548581446840948044543680148146102083
    8          4      4.669060660648268239132599822630273970875
    9          4      4.669171555379511388886004609897560033836
   10          4      4.669195156030017174021108801191558304938
   11          6      4.669200229086856497938353781003810044639
   12          7      4.66920131329420417116475494118414885682
   13          7      4.669201545780906707506058109960038118631
   14          7      4.669201595537493910292470639266101619701
   15          9      4.669201606198152157723831098067070167449
   16          9      4.669201608480804423294067936197345435789
   17          9      4.66920160896974470048248536837343166496
   18         10      4.669201609074452566227981315990238717244
   19         10      4.66920160909687879470513360848001376754
   20         12      4.669201609101681681186958959033209022075
   21         13      4.669201609102710327837251895947327626516
   22         14      4.669201609102930630539149782358669774031
   23         14      4.669201609102977812872078849723792590704
   24         14      4.669201609102987917842550686945063648103
   25         16      4.669201609102990082109591039030679816186

         true value=  4.669201609102990671853203820466201617258

For   50   decimal digits:

Using  10  iterations for  maxJ,  with  50  decimal digits:

            correct
────i──── ──digits─── ─────────────────────────d─────────────────────────
    2          0      3.2185114220380879122705045307428132560288203779709
    3          1      4.3856775985683390857449485687755223461032163565761
    4          2      4.6009492765380753578116946986238349850235524966338
    5          2      4.6551304953919801364862549958568988194754604973163
    6          3      4.6661119478285713883312136967117764807190589709335
    7          3      4.6685485814468409480445436801481462655432879036191
    8          4      4.6690606606482682391325998226302726377996820048001
    9          4      4.6691715553795113888860046098975670882406762637156
   10          4      4.6691951560300171740211088011914920933921530026738
   11          6      4.6692002290868564979383537810040672174088979117872
   12          7      4.6692013132942041711647549411855711837281506913619
   13          7      4.669201545780906707506058109930429736433895282946
   14          7      4.6692015955374939102924706392896460400580631742226
   15          9      4.669201606198152157723831097078594524390001462635
   16          9      4.6692016084808044232940679458986228433868918971945
   17          9      4.6692016089697447004824853219383733420478533710096
   18         10      4.6692016090744525662279815203708867655911039176535
   19         10      4.6692016090968787947051350378647834642184844514321
   20         12      4.6692016091016816811869601608458025942520519239165
   21         13      4.6692016091027103278372102086291147081441587520389
   22         14      4.6692016091029306305397781412054635772954039489788
   23         14      4.6692016091029778128684959415909409745410570226985
   24         14      4.6692016091029879178492459786120026677307662966576
   25         16      4.6692016091029900820302890757279774163961895200742

         true value=  4.6692016091029906718532038204662016172581855774758

For   60   decimal digits:

Using  10  iterations for  maxJ,  with  60  decimal digits:

            correct
────i──── ──digits─── ──────────────────────────────d──────────────────────────────
    2          0      3.21851142203808791227050453074281325602882037797108219914195
    3          1      4.38567759856833908574494856877552234610321635657649780870002
    4          2      4.60094927653807535781169469862383498502355249663354337228864
    5          2      4.65513049539198013648625499585689881947546049738522607840669
    6          3      4.66611194782857138833121369671177648071905897173694216387654
    7          3      4.66854858144684094804454368014814626554328789665434875726458
    8          4      4.66906066064826823913259982263027263779968209542149739645327
    9          4      4.6691715553795113888860046098975670882406765731707896864092
   10          4      4.66919515603001717402110880119149209339214790860575667043884
   11          6      4.66920022908685649793835378100406721740888804890682292715866
   12          7      4.66920131329420417116475494118557118372824888898657591993058
   13          7      4.6692015457809067075060581099304297364315643304525960728651
   14          7      4.66920159553749391029247063928964604007454741248894160626657
   15          9      4.66920160619815215772383109707859452442133651601886184881893
   16          9      4.66920160848080442329406794589862284279286838186077964235606
   17          9      4.66920160896974470048248532193837334390738554123097139976161
   18         10      4.66920160907445256622798152037088675394609964381174635788482
   19         10      4.66920160909687879470513503786478367762266653874157074386282
   20         12      4.66920160910168168118696016084580172992808891003148562640334
   21         13      4.66920160910271032783721020862911185778172326442565716536709
   22         14      4.66920160910293063053977814120551764178343752008225932597126
   23         14      4.66920160910297781286849594159066394676899035975117693184181
   24         14      4.66920160910298791784924597861351311575702672457052187681814
   25         16      4.66920160910299008203028907572873571164451680641851773878632

         true value=  4.66920160910299067185320382046620161725818557747576863274565

For   70   decimal digits:

            correct
────i──── ──digits─── ───────────────────────────────────d───────────────────────────────────
    2          0      3.218511422038087912270504530742813256028820377971082199141994437483264
    3          1      4.385677598568339085744948568775522346103216356576497808699630752612707
    4          2      4.600949276538075357811694698623834985023552496633543372295593454453943
    5          2      4.655130495391980136486254995856898819475460497385226078363311588173369
    6          3      4.666111947828571388331213696711776480719058971736942163972368911928369
    7          3      4.668548581446840948044543680148146265543287896654348757317309551877191
    8          4      4.669060660648268239132599822630272637799682095421497400522886796129394
    9          4      4.669171555379511388886004609897567088240676573170789783804375123155331
   10          4      4.669195156030017174021108801191492093392147908605756405516325953901305
   11          6      4.669200229086856497938353781004067217408888048906823830162962197636106
   12          7      4.669201313294204171164754941185571183728248888986548913352218691391234
   13          7      4.669201545780906707506058109930429736431564330452605295006133445674219
   14          7      4.669201595537493910292470639289646040074547412490596040512697122945726
   15          9      4.669201606198152157723831097078594524421336516011873717994576148241557
   16          9      4.669201608480804423294067945898622842792868381815074127666008519547807
   17          9      4.669201608969744700482485321938373343907385540992447405914541777669855
   18         10      4.669201609074452566227981520370886753946099646679618269983331571360562
   19         10      4.669201609096878794705135037864783677622666525741836726551719975589237
   20         12      4.669201609101681681186960160845801729928088893244076177775471467408333
   21         13      4.669201609102710327837210208629111857781724142614997374915326806800362
   22         14      4.66920160910293063053977814120551764178343912104101642911388967884521
   23         14      4.669201609102977812868495941590663946768960431441218530680922308996195
   24         14      4.669201609102987917849245978613513115757246210043045367998209732838256
   25         16      4.669201609102990082030289075728735711642616959039291006563095888962633

         true value=  4.669201609102990671853203820466201617258185577475768632745651343004134

For   80   decimal digits:

Using  10  iterations for  maxJ,  with  80  decimal digits:

            correct
────i──── ──digits─── ────────────────────────────────────────d────────────────────────────────────────
    2          0      3.218511422038087912270504530742813256028820377971082199141994437483271226037644
    3          1      4.3856775985683390857449485687755223461032163565764978086996307526127059403885727
    4          2      4.6009492765380753578116946986238349850235524966335433722955934544543297715255263
    5          2      4.65513049539198013648625499585689881947546049738522607836331158816512330701185
    6          3      4.6661119478285713883312136967117764807190589717369421639723689119899863948191767
    7          3      4.6685485814468409480445436801481462655432878966543487573173095514004033372611035
    8          4      4.6690606606482682391325998226302726377996820954214974005228867986774308919065374
    9          4      4.6691715553795113888860046098975670882406765731707897838043751138046951387299861
   10          4      4.6691951560300171740211088011914920933921479086057564055163259615974354982832945
   11          6      4.669200229086856497938353781004067217408888048906823830162962242800073690648252
   12          7      4.6692013132942041711647549411855711837282488889865489133522172264691137798051217
   13          7      4.6692015457809067075060581099304297364315643304526052950061428053412995477405222
   14          7      4.6692015955374939102924706392896460400745474124905960405127779853884788591538808
   15          9      4.669201606198152157723831097078594524421336516011873717994000712974012683245483
   16          9      4.6692016084808044232940679458986228427928683818150741276727477649124978493132468
   17          9      4.6692016089697447004824853219383733439073855409924474058836052813335649172765848
   18         10      4.6692016090744525662279815203708867539460996466796182702147591041819366993698455
   19         10      4.6692016090968787947051350378647836776226665257418367260642987724054233659298261
   20         12      4.6692016091016816811869601608458017299280888932440761709767910747509918644406354
   21         13      4.6692016091027103278372102086291118577817241426149973921672976705446842793794715
   22         14      4.6692016091029306305397781412055176417834391210410168137358073785476857294775448
   23         14      4.6692016091029778128684959415906639467689604314412120973278560695067487724011958
   24         14      4.6692016091029879178492459786135131157572462100430915357209982548433093297570592
   25         16      4.6692016091029900820302890757287357116426169590391741098422496772889977674631437

         true value=  4.6692016091029906718532038204662016172581855774757686327456513430041343302113147


Is the term 'true value' appropriate here? Increasing the number of digits results in more and more digits of this "constant". The true value may have an infinite number of digits. The approximations shown here are quite stable.--Walter Pachl 02:07, 16 November 2018 (UTC)
         true value=  4.669201609
         true value=  4.6692016091029906719
         true value=  4.66920160910299067185320382047
         true value=  4.669201609102990671853203820466201617258
         true value=  4.6692016091029906718532038204662016172581855774758
         true value=  4.66920160910299067185320382046620161725818557747576863274565
         true value=  4.669201609102990671853203820466201617258185577475768632745651343004134
The approximations shown above are all the same value (taken from the same variable),   the only difference is the number of decimal digits (precision) being used when the value was displayed   (plus the value will be rounded within the precision being used).     -- Gerard Schildberger (talk) 03:21, 16 November 2018 (UTC)
The true value shown (for each program execution) is the true value (taken from a value that is assigned), rounded to the number of decimal digits in use for the program.   For the true value, the actual constant within the program is accurate to 115 decimal digits.   All computed values shown for the output are, by definition, approximations, limited by the number of decimal digits and the number of iterations.     -- Gerard Schildberger (talk) 02:52, 16 November 2018 (UTC)
Showing the true value of     is in the same vein.   It's only accurate (or true) up to the number of (decimal) digits for   ,   rounded to the number of decimal digits shown.     -- Gerard Schildberger (talk) 02:56, 16 November 2018 (UTC)
Adding more decimal digits   (for the REXX calculations)   will result in more (accurate) digits of Feigenbaum constant,   provided that enough iterations are used,   ... up to some point.   When that point is reached, the calculations start diverging and less (accurate) decimal digits are produced (calculated).     -- Gerard Schildberger (talk) 01:20, 18 November 2018 (UTC)