# Add new comment

Teo tells us about his work in artificial intelligence, his travels around the world, and how inspiration sometimes strikes in the pub.

Clouds make the weather, yet their detail isn't taken into account in weather forecasts. Artificial intelligence might be able to help.

Predicting the weather is hard. With more data and computing power becoming available, artificial intelligence can help.

How does your phone know what the weather's going to be like?

How a little insect can cause chaos.

Use a matrix to evaluate successive partial values of for phi:

[[0 1],[1 1]]

or root 2:

[[0 1],[1 2]]

or root N:

[[0 (N-(n'*n'))],[0 2n']] (where root n' is the nearest perfect square less than N)

Note that the first row vector of this matrix takes the second entry of the previous result and moves it up to the first entry of the new result (and scales it by a 'factor' measuring the difference from the nearest square in the case general square root). This gives a fraction a/b in the form of the output vector [a b] that, added to n' approximates a square root by an improper fraction, n' + (a/b)

This adapts the method of pure partial fractions. See wikipedia article https://en.wikipedia.org/wiki/Continued_fraction#Generalized_continued_… for the motivation.