Post Reply 
Little explorations with HP calculators (no Prime)
03-27-2017, 07:24 PM (This post was last modified: 03-27-2017 07:28 PM by Joe Horn.)
Post: #39
RE: Little explorations with the HP calculators
(03-27-2017 05:29 PM)pier4r Wrote:  
Quote:Brilliant.org

[Image: mweac3e.png]

For this I wrote a quick program, remembering some quality of the mean that after enough iterations it stabilizes...

After running 100 million iterations several times in UBASIC, I'm surprised that each run SEEMS to be converging, but each run ends with a quite different result:

10 randomize
20 T=0:C=0
30 repeat
40   T+=sqr((rnd-rnd)^2+(rnd-rnd)^2):C+=1
50 until C=99999994
60 repeat
70   T+=sqr((rnd-rnd)^2+(rnd-rnd)^2):C+=1
80   print C;T/C
90 until C=99999999
run
99999995 0.5214158234249566646569152059
99999996 0.5214158242970253667174680247
99999997 0.5214158240318481570747604814
99999998 0.5214158247892039896051570164
99999999 0.5214158253601312510245695897
OK
run
99999995 0.5213642776110289008920452545
99999996 0.5213642752079475043717958065
99999997 0.52136427197858201293861314
99999998 0.5213642744828552963477424429
99999999 0.5213642759132547792130043215
OK
run
99999995 0.5213770659191193073147616413
99999996 0.5213770610000764506616015052
99999997 0.5213770617149058467216528505
99999998 0.5213770589414874167694264508
99999999 0.5213770570854305903944611055
OK


So it SEEMS to be zeroing on something close to -LOG(LOG(2)), but I give up.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with the HP calculators - Joe Horn - 03-27-2017 07:24 PM



User(s) browsing this thread: 5 Guest(s)