webproger > math > approximating
 
Pillow English Listening
 
Fibonacci  Sequence
Fibonacci Sequence
20523#20538 SIBLINGS CHILDREN 20538
 
Fibonacci Sequence
<pre><script>
var x = 1;
var y = 1;
for(i=1; i<=100; i++) {
  document.writeln(i+' : '+(y/x));
  var z = x+y;
  if(y/x==z/y) break;
  else { x = y; y = z; }
}
</script></pre>
20523#20536 SIBLINGS CHILDREN 20536
 
Fibonacci Sequence
40 : 1.618033988749895
20523#20537 SIBLINGS CHILDREN 20537
 
golden ratio   φ
golden ratio φ
a/b = (a+b)/a = 1+b/a ➔ φ = 1+1/φ
20523#20539 SIBLINGS CHILDREN 20539
 
golden ratio φ
<pre><script>
var x = 1.618;
for(i=1; i<=100; i++) {
  document.writeln(i+' : '+x);
  var y = 1+1/x;
  if(x==y) break;
  else x = y;
}
</script></pre>
20523#20534 SIBLINGS CHILDREN 20534
 
golden ratio φ
28 : 1.618033988749895
20523#20535 SIBLINGS CHILDREN 20535
 
square root  √2
square root √2
x˄2 = 2 ➔ x = (x˄2+2)/(2·x) ┆ 「xₙ」 = 「(xₙ₋₁˄2+2)/(2·xₙ₋₁)」
20523#20541 SIBLINGS CHILDREN 20541
 
square root √2
<pre><script>
var x = □;
for(i=1; i<=100; i++) {
  document.writeln(i+' : '+x);
  var y = (x*x+2)/(2*x);
  if(x==y) break;
  else x = y;
}
</script></pre>
20523#20524 SIBLINGS CHILDREN 20524
 
square root √2 from 1
6 : 1.414213562373095
20523#20526 SIBLINGS CHILDREN 20526
 
square root √2 from 5
8 : 1.414213562373095
20523#20531 SIBLINGS CHILDREN 20531

-