title: Mathematical functions in Swift
body: <p>How do I use mathematical functions like <code>sqrt()</code>, <code>floor()</code>, <code>round()</code>, <code>sin()</code>, etc?</p>
  
  <hr>
  
  <p>When doing:</p>
  
  <pre><code>_ = floor(2.0)
  _ = sqrt(2.0)
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>error: use of unresolved identifier 'floor'<br>
    error: use of unresolved identifier 'sqrt'  </p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/vplCJ.png" alt="enter image description here"></p>