Since we are on the topic of fixed point iterative methods for calculation of irrational numbers I have decided to talk about how to calculate one of my favorite irrational numbers:
Also known as the golden ratio, is often the subject of psudoscientific conjecture and mysticism. This ratio has been used in greek architecture, under the belief that it produces aesthetically pleasing geometry. It would be used to construct golden rectangles, and as a ratio between various lengths in architecture.
is the ratio you get when you divide a line segment in two such that the ratio of the larger half to the smaller half is the same as the ratio of the whole line to the larger half. This is a pretty natural way to define it.
It also pops up in the Fibonacci sequence.
The fibonacci sequence is recursively defined as : Numbers that appear in this sequence are called the fibonacci numbers. Let
denote the
fibonacci number.
here is some code that will caulate it with matlab:
clear;
x(1) = 1;
x(2) = 1;
for j=3:1000
x(j) = x(j-1) + x(j-2);
phi = x(j)/x(j-1);
end
format long;
phi