title: I get wrong output for cos(90)
body: <p>I am building a calculator and I need to use cosinus. It works fine if I try cos(0), cos(30), but I get an odd output for cos(90) - 6.12323399573677e-17.<br>
  I checked the output for my <em>radiansToDegrees</em> and it looks ok.<br>
  Sinus works fine, for all the codes.<br>
  The numbers are in degrees not radians.<br>
  I use the latest xCode.<br>
  <br>
  My code:</p>
  
  <pre><code>import Foundation
  ...
  func radiansToDegrees (radians: Double)-&gt;Double {
      return radians * 180 / M_PI
  }
  ...
  let number = degreesToRadians(Double(digitsLabel.text!)!)
  digitsLabel.text = "\(cos(number))"
  </code></pre>
  
  <p>Does anyone have an idea what is wrong?</p>