private static void Main(string[] args) { int a, b; GetApproximateFraction((decimal)Math.Sqrt(3), int.MaxValue, out a, out b); }