Hey Folks,
            
            
this might be a total newbie question, but I can't figure it out.
            
So I am making a calculation in a float that brings me a NaN value (that is because the result of the computation is a complex number... for example sqrt(-1) ).
            
How can I convert this float into a complex value.
            
I used
http://commons.apache.org/math/api-2.0/org/apache/commons/math/complex/Complex.html
            
but there they only tell you how to create a Complex Number from two values. I only have my float computation....
            
My ultimate goal is to return just the real-value of my computation (not sqrt(-1), something more complicated....)
            
Thanks for any help!
 
           
 
            
           this might be a total newbie question, but I can't figure it out.
So I am making a calculation in a float that brings me a NaN value (that is because the result of the computation is a complex number... for example sqrt(-1) ).
How can I convert this float into a complex value.
I used
http://commons.apache.org/math/api-2.0/org/apache/commons/math/complex/Complex.html
but there they only tell you how to create a Complex Number from two values. I only have my float computation....
My ultimate goal is to return just the real-value of my computation (not sqrt(-1), something more complicated....)
Thanks for any help!
 
              
              1  
            
 
            
 
 
          