public static Complex operator /(Complex x, Complex y) { PromoteExactness(x, y, out x, out y); ComplexPart divisor = (y.Real * y.Real) + (y.Imag * y.Imag); var newReal = ((x.Real * y.Real) + (x.Imag * y.Imag)) / divisor; var newImag = ((x.Imag * y.Real) - (x.Real * y.Imag)) / divisor; return(new Complex(newReal, newImag, x.IsExact)); }
public static Complex CreateInExact(ComplexPart a, ComplexPart b) { return(new Complex(a, b, false)); }
public Complex(ComplexPart real, ComplexPart imag, bool isExact) { Real = real; Imag = imag; IsExact = isExact; }
public static Complex CreateInexactReal(double a) { return(new Complex(ComplexPart.CreateFromDouble(a), ComplexPart.Zero, false)); }
public static Complex CreateExact(ComplexPart a, ComplexPart b) { return(new Complex(a, b, true)); }