Finding the exact value of cotangent