title: Magnitude of complex numbers
body: <p>I'm working on a project that deals with complex numbers, to explain more <em>(a + bi)</em> where "<em>a</em>" is the real part of the complex number and "<em>b</em>" is the imaginary part of it. (a and b are real numbers but "i" isn't)</p>
  
  <p>I'm having a hard time with implementing a <em>magnitude</em> method, instead of getting back a real number as a <em>double</em> i get <em>infinity</em>.</p>
  
  <p>This is what I'm trying to implement: | (a + bi) | = √(a^2 + b^2)</p>
  
  <p>a snippet off my code</p>
  
  <pre><code>public double mag(){
      /**
       * Compute the magnitude of this complex number.
       * 
       */
      //final double re is the real part
      //final double I'm is the imaginary part 
      double mag = Math.sqrt(Math.pow(this.re, 2) + Math.pow(this.im, 2));
  
      return mag;
  }
  </code></pre>
  
  <p>say, if both real and imaginary numbers were Double.MAX_VALUE. why would mag return <em>infinity</em> instead of 1.8961503816218352E154 ?</p>