dirichlets approximation theorem

Input interpretation

Dirichlet's approximation theorem

Definition

Given any real number θ and any positive integer N, there exist integers h and k with 0<k<=N such that
 left bracketing bar k θ - h right bracketing bar <1/N.
A slightly weaker form of the theorem states that for every real θ, there exist integers h and k with k>0 and (h, k) = 1 such that
 left bracketing bar θ - h/k right bracketing bar <1/k^2.