Function to Approximate a Square