title: How to compute the square root of negative numbers?
body: <p>I'm trying to create a complex number from the square root of a negative number using the following code:</p>
  
  <pre><code> include Math
   z = Complex(sqrt(-9))
  </code></pre>
  
  <p>But it produces this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Math::DomainError: Numerical argument is out of domain - "sqrt"
      from kata2.rb:20:in `sqrt'
      from kata2.rb:20:in `polinomio'
      from kata2.rb:34
      from /home/howarto/.rvm/rubies/ruby-2.0.0-p247/bin/irb:13:in `&lt;main&gt;'
  </code></pre>
  
  <p>How can I build a complex number from the square root of a negative number?</p>