Project Euler – Problem 57 Solution
Problem It is possible to show that the square root of two can be expressed as an infinite continued fraction. By expanding this for the first four iterations, we get: 1 + 1/2 = 3/2 = 1.5 1 + 1/(2 + 1/2) = 7/5 = 1.4 1 + 1/(2 + 1/(2 + 1/2)) = 17/12 …