The algorithm is as follows:
Because a: (a+b) = b: a.
So aa=b(a+b) is bb+ab-aa = 0- 1.
Let b:a=n, then b=na,
Replace b in the formula 1 with b=na to get nnaa+naa-aa-=0.
That is, aa(nn+n- 1)=0, where aa is not less than zero, then nn+n- 1=0.
According to the root formula, n=(√5+ 1)/2 or n=(√5- 1)/2.
Because n = b: a
That is, the golden ratio b:a=(√5- 1)/2.
Call it a day when you're done!
I hope it helps you!