title: Correctly formulate if statement in switch
body: <p>This might be a very rudimentary question, but I'm playing around with if statements and the following example won't work with error "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions". Does anybody know what I'm doing wrong?</p>
  
  <pre><code>let a = 4
  
  let b = 3
  
  let c = 10
  
  let d = 2
  
  
  if ((sqrt((a - b)^2 + (c - d)^2)) &gt; 100) {
                print("Yes")
          }
  </code></pre>
  
  <hr>
  
  <p>Edit: I understood I made a few mistakes and now got it working with: </p>
  
  <pre><code>var a = 4
  
  var b = 3
  
  var c = 10
  
  var d = 2
  
  var e = (a-b)
  
  var f = (c-d)
  
  var g = (e*e)
  
  var h = (f*f)
  
  var j = Double(g+h)
  
  if (j.squareRoot() &gt; 5) {
                print("Yes")
        }
  </code></pre>