Get real part from the complex numbers.

@param cn Complex numbers.
@return Real part.
183293
public static double[][] getReal(ComplexNumber[][] cn) {
        double[][] n = new double[cn.length][cn[0].length];
        for (int i = 0; i < n.length; i++) {
            for (int j = 0; j < n[0].length; j++) {
                n[i][j] = cn[i][j].real;
            }
        }
        return n;
    }
484595
public static double[] Abs(ComplexNumber[] z) {
        double[] values = new double[z.length];
        for (int i = 0; i < values.length; i++) {
            values[i] = z[i].getMagnitude();
        }
        return values;
    }
391806
public Complex exp() {
        return new Complex(Math.exp(re) * Math.cos(im), Math.exp(re) * Math.sin(im));
    }
156199
public static ComplexNumber Tan(ComplexNumber z1) {
        ComplexNumber result = new ComplexNumber();

        if (z1.imaginary == 0.0) {
            result.real = Math.tan(z1.real);
            result.imaginary = 0.0;
        } else {
            double real2 = 2 * z1.real;
            double imag2 = 2 * z1.imaginary;
            double denom = Math.cos(real2) + Math.cosh(real2);

            result.real = Math.sin(real2) / denom;
            result.imaginary = Math.sinh(imag2) / denom;
        }

        return result;
    }
304598
public static function sin($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::create(sin($z->x)*cosh($z->y), cos($z->x)*sinh($z->y));
    }
1320031
public Complex times(Complex b) {
        Complex a = this;
        double real = a.re * b.re - a.im * b.im;
        double imag = a.re * b.im + a.im * b.re;
        return new Complex(real, imag);
    }
1135667
public Complex sin() {
        return new Complex(Math.sin(re) * Math.cosh(im), Math.cos(re) * Math.sinh(im));
    }
906485
public static function IMEXP($complexNumber)
    {
        $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber);

        $parsedComplex = self::parseComplex($complexNumber);

        if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) {
            return '1';
        }

        $e = exp($parsedComplex['real']);
        $eX = $e * cos($parsedComplex['imaginary']);
        $eY = $e * sin($parsedComplex['imaginary']);

        if ($parsedComplex['suffix'] == '') {
            return self::COMPLEX($eX, $eY);
        } else {
            return self::COMPLEX($eX, $eY, $parsedComplex['suffix']);
        }
    }
1268400
public Complex multiply(Complex c)
    {
        Complex ret = new Complex(real, imag);
        ret.mutableMultiply(c);
        return ret;
    }
388803
def cnst_c(self):
        
        """

        return np.zeros(self.S.shape + (len(self.axes),), self.dtype)
614090
public int getValue(int ch) 
    {
        // valid, uncompacted trie and valid c?
        if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
            return 0;
        }
    
        int block = m_index_[ch >> SHIFT_];
        return m_data_[Math.abs(block) + (ch & MASK_)];
    }
862794
function() {

      var tmp = Math.exp(this['re']);

      if (this['im'] === 0) {
        //return new Complex(tmp, 0);
      }
      return new Complex(
              tmp * Math.cos(this['im']),
              tmp * Math.sin(this['im']));
    }
202969
public ComplexDouble subi(ComplexDouble c, ComplexDouble result) {
    if (this == result) {
      r -= c.r;
      i -= c.i;
    } else {
      result.r = r - c.r;
      result.i = i - c.i;
    }
    return this;
  }
834921
public ComplexDouble muli(ComplexDouble c, ComplexDouble result) {
    double newR = r * c.r - i * c.i;
    double newI = r * c.i + i * c.r;
    result.r = newR;
    result.i = newI;
    return result;
  }
108050
function() {

      // acsc(c) = -i * log(i / c + sqrt(1 - 1 / c^2))

      var a = this['re'];
      var b = this['im'];

      if (a === 0 && b === 0) {
        return new Complex(Math.PI / 2, Infinity);
      }

      var d = a * a + b * b;
      return (d !== 0)
              ? new Complex(
                      a / d,
                      -b / d).asin()
              : new Complex(
                      (a !== 0) ? a / 0 : 0,
                      (b !== 0) ? -b / 0 : 0).asin();
    }
1108086
public Complex plus(Complex b) {
        Complex a = this;             // invoking object
        double real = a.re + b.re;
        double imag = a.im + b.im;
        return new Complex(real, imag);
    }
200468
public static double[] getImaginary(ComplexNumber[] cn) {
        double[] n = new double[cn.length];
        for (int i = 0; i < n.length; i++) {
            n[i] = cn[i].imaginary;
        }
        return n;
    }