-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
The example of finding a function's fixed point using ⍣=
confused me
2÷⍨⍣=10 ⍝ Divide by 2 until we reach a fixed point
I understand that ⍣=
will keep evaluating until the result no longer changes, but 10
(or any number) repeatedly divided by 2 only asymptotes to 0
2÷⍨⍣1⊢10
5
2÷⍨⍣2⊢10
2.5
2÷⍨⍣10⊢10
0.009765625
2÷⍨⍣100⊢10
7.888609052E¯30
so (I think) it only returns 0
because it loses precision.
I tried to find another more useful example. Application of the Collatz Conjecture always reaches 1
, so that's perhaps not so interesting.
I suspect the canonical example of the Golden Ratio is more illuminating
+∘÷⍣1⍨1
2
+∘÷⍣2⍨1
1.5
+∘÷⍣3⍨1
1.666666667
+∘÷⍣=⍨1
1.618033989
Metadata
Metadata
Assignees
Labels
No labels