Shanks' logarithm on the Stern–Brocot tree

By using lazy arithmetic within Shanks' logarithm algorithm, the logarithm algorithm itself becomes lazy. This allows to handle even irrational numbers.