Divide two complex numbers.

@param z1 Complex Number.
@param z2 Complex Number.
@return Returns new ComplexNumber instance containing the divide of specified complex numbers.
762615
public static ComplexNumber Divide(ComplexNumber z1, ComplexNumber z2) {

        ComplexNumber conj = ComplexNumber.Conjugate(z2);

        double a = z1.real * conj.real + ((z1.imaginary * conj.imaginary) * -1);
        double b = z1.real * conj.imaginary + (z1.imaginary * conj.real);

        double c = z2.real * conj.real + ((z2.imaginary * conj.imaginary) * -1);

        return new ComplexNumber(a / c, b / c);
    }
592230
public float[] t2(float[] z, int k) {
    float[] result = new float[z.length];

    for (int i = 0; i < k; i++) {
      result[i] = (new Transformations()).sDecept(z[i], (float) 0.35, (float) 0.001, (float) 0.05);
    }

    for (int i = k; i < z.length; i++) {
      result[i] = (new Transformations()).sMulti(z[i], 30, 95, (float) 0.35);
    }

    return result;
  }
1010342
public static ComplexNumber Pow(ComplexNumber z1, double n) {

        double norm = Math.pow(z1.getMagnitude(), n);
        double angle = 360 - Math.abs(Math.toDegrees(Math.atan(z1.imaginary / z1.real)));

        double common = n * angle;

        double r = norm * Math.cos(Math.toRadians(common));
        double i = norm * Math.sin(Math.toRadians(common));

        return new ComplexNumber(r, i);

    }
41257
public static void divide(double[] array1, double[] array2) {
        assert (array1.length == array2.length);
        for (int i=0; i<array1.length; i++) {
            array1[i] /= array2[i];
        }
    }
311788
public static ComplexNumber Multiply(ComplexNumber z1, ComplexNumber z2) {
        double z1R = z1.real, z1I = z1.imaginary;
        double z2R = z2.real, z2I = z2.imaginary;

        return new ComplexNumber(z1R * z2R - z1I * z2I, z1R * z2I + z1I * z2R);
    }
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);
    }
391806
public Complex exp() {
        return new Complex(Math.exp(re) * Math.cos(im), Math.exp(re) * Math.sin(im));
    }
696687
public static function div($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        $d = $w->x * $w->x + $w->y * $w->y;

        if ($d == 0) throw new DivisionByZeroException();

        return static::create(($z->x * $w->x + $z->y * $w->y)/$d, (-$z->x * $w->y + $z->y * $w->x)/$d);
    }
245677
public Complex divide(Complex c)
    {
        Complex ret = new Complex(real, imag);
        ret.mutableDivide(c);
        return ret;
    }
438947
@Override
  public GallicWeight divide(GallicWeight a, GallicWeight b) {
    if (isZero(a)) return zero;
    Preconditions.checkArgument(isNotZero(b), "cant divide by zero");
    IntArrayList newOutputLabels = new IntArrayList();
    for (int i = b.getLabels().size(); i < a.getLabels().size(); i++) {
      newOutputLabels.add(a.getLabels().get(i));
    }
    double newWeight = this.weightSemiring.divide(a.getWeight(), b.getWeight());
    return GallicWeight.create(newOutputLabels, newWeight);
  }
1079696
public static void Swap(ComplexNumber[] z) {
        for (int i = 0; i < z.length; i++) {
            z[i] = new ComplexNumber(z[i].imaginary, z[i].real);
        }
    }
624099
public double divideBy(Resource other) throws RuntimeException {
    if (other.getCpu() == 0 || other.getRam().isZero() || other.getDisk().isZero()) {
      throw new RuntimeException("Division by 0.");
    } else {
      double cpuFactor = Math.ceil(this.getCpu() / other.getCpu());
      double ramFactor = Math.ceil((double) this.getRam().asBytes() / other.getRam().asBytes());
      double diskFactor = Math.ceil((double) this.getDisk().asBytes() / other.getDisk().asBytes());
      return Math.max(cpuFactor, Math.max(ramFactor, diskFactor));
    }
  }
750064
@Override
    public Money divide(double divisor) {
        if (NumberVerifier.isInfinityAndNotNaN(divisor)) {
            return Money.of(0, getCurrency());
        }
        if (divisor == 1.0d) {
            return this;
        }
        return divide(new BigDecimal(String.valueOf(divisor)));
    }
56283
public static double[][] Abs(ComplexNumber[][] z) {
        double[][] values = new double[z.length][z[0].length];
        for (int i = 0; i < values.length; i++) {
            for (int j = 0; j < values[0].length; j++) {
                values[i][j] = z[i][j].getMagnitude();
            }
        }
        return values;
    }
88387
public static ComplexNumber Subtract(ComplexNumber z1, ComplexNumber z2) {
        return new ComplexNumber(z1.real - z2.real, z1.imaginary - z2.imaginary);
    }
995941
function(a, b) {

      var z = new Complex(a, b);

      return Math.abs(z['re'] - this['re']) <= Complex['EPSILON'] &&
              Math.abs(z['im'] - this['im']) <= Complex['EPSILON'];
    }
654354
function div(a, b) {
    if (b instanceof complex_1.Complex) {
        return _mul_two(a, b.inverse());
    }
    else {
        return _mul_two(a, 1 / b);
    }
}