Absolute value of complex number.

@param z Complex Numbers.
@return Absolute number.
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;
    }
826137
public double getMin(double x, double y, double z)
	{
		double ret = Double.NaN;
		if (!Double.isNaN(x))
			ret = x;
		if (!Double.isNaN(y))
		{
			if (!Double.isNaN(ret))
				ret = Math.min(ret, y);
			else
				ret = y;
		}
		if (!Double.isNaN(z))
		{
			if (!Double.isNaN(ret))
				ret = Math.min(ret, z);
			else
				ret = z;
		}
		return ret;
	}
1304079
public Vector3f absolute(Vector3f dest) {
        dest.x = Math.abs(this.x);
        dest.y = Math.abs(this.y);
        dest.z = Math.abs(this.z);
        return dest;
    }
1198789
function() {

      var a = this['re'];
      var b = this['im'];
      var r = this['abs']();

      var re, im;

      if (a >= 0) {

        if (b === 0) {
          return new Complex(Math.sqrt(a), 0);
        }

        re = 0.5 * Math.sqrt(2.0 * (r + a));
      } else {
        re = Math.abs(b) / Math.sqrt(2 * (r - a));
      }

      if (a <= 0) {
        im = 0.5 * Math.sqrt(2.0 * (r - a));
      } else {
        im = Math.abs(b) / Math.sqrt(2 * (r + a));
      }

      return new Complex(re, b < 0 ? -im : im);
    }
1058120
function() {

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

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

      if (a === 0 && b === 0) {
        return new Complex(0, Infinity);
      }

      var d = a * a + b * b;
      return (d !== 0)
              ? new Complex(
                      a / d,
                      -b / d).acos()
              : new Complex(
                      (a !== 0) ? a / 0 : 0,
                      (b !== 0) ? -b / 0 : 0).acos();
    }
573124
@Pure
	@Inline(value = "Math.abs($1) < Math.ulp($1)", imported = Math.class)
	public static boolean isEpsilonZero(double value) {
		return Math.abs(value) < Math.ulp(value);
	}
498164
public static double Phi(double z) {
        if (z < -8.0) return 0.0;
        if (z >  8.0) return 1.0;
        double sum = 0.0, term = z;
        for (int i = 3; sum + term != sum; i += 2) {
            sum  = sum + term;
            term = term * z * z / i;
        }
        return 0.5 + sum * phi(z);
    }
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;
    }
975353
public static boolean alg_87(int[] blz, int[] number) {
        // Ausnahme
        int[] temp = number.clone();
        if (number[2] == 9) {
            return alg_51(blz, number);
        }

        // Methode A
        int[] tab1 = new int[]{0, 4, 3, 2, 6};
        int[] tab2 = new int[]{7, 1, 5, 9, 8};

        int i = 3;
        while (number[i] == 0) {
            i++;
        }
        int c2 = (i + 1) % 2;
        int d2 = 0;
        int a5 = 0;
        int p;
        while (i < 9) {
            switch (number[i]) {
                case 0:
                    number[i] = 5;
                    break;
                case 1:
                    number[i] = 6;
                    break;
                case 5:
                    number[i] = 10;
                    break;
                case 6:
                    number[i] = 1;
                    break;
            }
            if (c2 == d2) {
                if (number[i] > 5) {
                    if (c2 == 0 && d2 == 0) {
                        c2 = 1;
                        d2 = 1;
                        a5 = a5 + 6 - (number[i] - 6);
                    } else {
                        c2 = 0;
                        d2 = 0;
                        a5 = a5 + number[i];
                    }
                } else {
                    if (c2 == 0 && d2 == 0) {
                        c2 = 1;
                        a5 = a5 + number[i];
                    } else {
                        c2 = 0;
                        a5 = a5 + number[i];
                    }
                }
            } else {
                if (number[i] > 5) {
                    if (c2 == 0) {
                        c2 = 1;
                        d2 = 0;
                        a5 = a5 - 6 + (number[i] - 6);
                    } else {
                        c2 = 0;
                        d2 = 1;
                        a5 = a5 - number[i];
                    }
                } else {
                    if (c2 == 0) {
                        c2 = 1;
                        a5 = a5 - number[i];
                    } else {
                        c2 = 0;
                        a5 = a5 - number[i];
                    }
                }
            }
            i++;
        }

        while (a5 < 0 || a5 > 4) {
            if (a5 > 4) {
                a5 = a5 - 5;
            } else {
                a5 = a5 + 5;
            }
        }

        if (d2 == 0) {
            p = tab1[a5];
        } else {
            p = tab2[a5];
        }

        if (p == number[9]) {
            return true;
        }

        if (number[3] == 0) {
            if (p > 4) {
                p = p - 5;
            } else {
                p = p + 5;
            }
            if (p == number[9]) {
                return true;
            }
        }
        // Ende Methode A

        number = temp;
        // Methode B
        if (alg_33(blz, number)) {
            return true;
        }

        // Methode C
        int sum = addProducts(number, 4, 8, new int[]{6, 5, 4, 3, 2}, false);
        int crc = (7 - (sum % 7)) % 7;
        return number[9] == crc;
    }
241049
public Vector3d set(Vector2fc v, double z) {
        return set(v.x(), v.y(), z);
    }
147817
public Vector3d set(Vector2ic v, double z) {
        return set(v.x(), v.y(), z);
    }
1303478
public static ComplexNumber Divide(ComplexNumber z1, double scalar) {
        return new ComplexNumber(z1.real / scalar, z1.imaginary / scalar);
    }
1040761
static boolean isAlphanum(int c) {
		return ( (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || 
				 (c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '\\' || 
				 c > 126);
	}
1003217
public static function exp($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $r = exp($z->x);
        return new Complex($r*cos($z->y), $r*sin($z->y));
    }
1021369
public Complex reciprocal() {
        double scale = re * re + im * im;
        return new Complex(re / scale, -im / scale);
    }
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);
    }
302922
public static ComplexNumber Subtract(ComplexNumber z1, double scalar) {
        return new ComplexNumber(z1.real - scalar, z1.imaginary);
    }