1 write to m_imaginary
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
57
m_imaginary
= imaginary;
112 references to m_imaginary
System.Runtime.Numerics (112)
System\Numerics\Complex.cs (112)
61
public double Imaginary { get { return
m_imaginary
; } }
64
public double Phase { get { return Math.Atan2(
m_imaginary
, m_real); } }
139
return new Complex(-value.m_real, -value.
m_imaginary
);
144
return new Complex(left.m_real + right.m_real, left.
m_imaginary
+ right.
m_imaginary
);
149
return new Complex(left.m_real + right, left.
m_imaginary
);
154
return new Complex(left + right.m_real, right.
m_imaginary
);
159
return new Complex(left.m_real - right.m_real, left.
m_imaginary
- right.
m_imaginary
);
164
return new Complex(left.m_real - right, left.
m_imaginary
);
169
return new Complex(left - right.m_real, -right.
m_imaginary
);
175
double result_realpart = (left.m_real * right.m_real) - (left.
m_imaginary
* right.
m_imaginary
);
176
double result_imaginarypart = (left.
m_imaginary
* right.m_real) + (left.m_real * right.
m_imaginary
);
184
if (!double.IsFinite(left.
m_imaginary
))
192
if (!double.IsFinite(left.
m_imaginary
))
194
return new Complex(double.NaN, left.
m_imaginary
* right);
197
return new Complex(left.m_real * right, left.
m_imaginary
* right);
204
if (!double.IsFinite(right.
m_imaginary
))
212
if (!double.IsFinite(right.
m_imaginary
))
214
return new Complex(double.NaN, left * right.
m_imaginary
);
217
return new Complex(left * right.m_real, left * right.
m_imaginary
);
224
double b = left.
m_imaginary
;
226
double d = right.
m_imaginary
;
253
if (!double.IsFinite(left.
m_imaginary
))
261
if (!double.IsFinite(left.
m_imaginary
))
263
return new Complex(double.NaN, left.
m_imaginary
/ right);
267
return new Complex(left.m_real / right, left.
m_imaginary
/ right);
275
double d = right.
m_imaginary
;
292
return double.Hypot(value.m_real, value.
m_imaginary
);
324
return new Complex(value.m_real, -value.
m_imaginary
);
330
if (value.m_real == 0 && value.
m_imaginary
== 0)
339
return left.m_real == right.m_real && left.
m_imaginary
== right.
m_imaginary
;
344
return left.m_real != right.m_real || left.
m_imaginary
!= right.
m_imaginary
;
354
return m_real.Equals(value.m_real) &&
m_imaginary
.Equals(value.
m_imaginary
);
357
public override int GetHashCode() => HashCode.Combine(m_real,
m_imaginary
);
372
handler.AppendFormatted(
m_imaginary
, format);
380
return new Complex(sin * Math.Cosh(value.
m_imaginary
), cos * Math.Sinh(value.
m_imaginary
));
390
Complex sin = Sin(new Complex(-value.
m_imaginary
, value.m_real));
391
return new Complex(sin.
m_imaginary
, -sin.m_real);
418
return new Complex(cos * Math.Cosh(value.
m_imaginary
), -sin * Math.Sinh(value.
m_imaginary
));
424
return Cos(new Complex(-value.
m_imaginary
, value.m_real));
460
double y2 = 2.0 * value.
m_imaginary
;
463
if (Math.Abs(value.
m_imaginary
) <= 4.0)
478
Complex tan = Tan(new Complex(-value.
m_imaginary
, value.m_real));
479
return new Complex(tan.
m_imaginary
, -tan.m_real);
606
public static bool IsFinite(Complex value) => double.IsFinite(value.m_real) && double.IsFinite(value.
m_imaginary
);
608
public static bool IsInfinity(Complex value) => double.IsInfinity(value.m_real) || double.IsInfinity(value.
m_imaginary
);
614
return new Complex(Math.Log(Abs(value)), Math.Atan2(value.
m_imaginary
, value.m_real));
631
return FromPolarCoordinates(expReal, value.
m_imaginary
);
640
if (double.IsInfinity(value.
m_imaginary
))
642
return new Complex(double.PositiveInfinity, value.
m_imaginary
);
646
if (double.IsNaN(value.
m_imaginary
))
659
if (value.
m_imaginary
== 0.0)
698
double imaginaryCopy = value.
m_imaginary
;
701
if (double.IsInfinity(value.
m_imaginary
))
749
double valueImaginary = value.
m_imaginary
;
751
double powerImaginary = power.
m_imaginary
;
770
double imaginaryResuilt = factor * value.
m_imaginary
;
1001
public static bool IsComplexNumber(Complex value) => (value.m_real != 0.0) && (value.
m_imaginary
!= 0.0);
1004
public static bool IsEvenInteger(Complex value) => (value.
m_imaginary
== 0) && double.IsEvenInteger(value.m_real);
1007
public static bool IsImaginaryNumber(Complex value) => (value.m_real == 0.0) && double.IsRealNumber(value.
m_imaginary
);
1010
public static bool IsInteger(Complex value) => (value.
m_imaginary
== 0) && double.IsInteger(value.m_real);
1018
return (value.
m_imaginary
== 0.0) && double.IsNegative(value.m_real);
1027
return (value.
m_imaginary
== 0.0) && double.IsNegativeInfinity(value.m_real);
1037
&& ((value.
m_imaginary
== 0.0) || double.IsNormal(value.
m_imaginary
));
1041
public static bool IsOddInteger(Complex value) => (value.
m_imaginary
== 0) && double.IsOddInteger(value.m_real);
1049
return (value.
m_imaginary
== 0.0) && double.IsPositive(value.m_real);
1058
return (value.
m_imaginary
== 0.0) && double.IsPositiveInfinity(value.m_real);
1062
public static bool IsRealNumber(Complex value) => (value.
m_imaginary
== 0.0) && double.IsRealNumber(value.m_real);
1070
return double.IsSubnormal(value.m_real) || double.IsSubnormal(value.
m_imaginary
);
1074
static bool INumberBase<Complex>.IsZero(Complex value) => (value.m_real == 0.0) && (value.
m_imaginary
== 0.0);
1114
if (double.IsNegative(y.
m_imaginary
))
1142
else if (double.IsNegative(y.
m_imaginary
))
1204
if (double.IsNegative(y.
m_imaginary
))
1232
else if (double.IsNegative(y.
m_imaginary
))
1294
if (double.IsNegative(y.
m_imaginary
))
1320
else if (double.IsNegative(y.
m_imaginary
))
1386
if (double.IsNegative(y.
m_imaginary
))
1412
else if (double.IsNegative(y.
m_imaginary
))
1447
result_realpart = double.MultiplyAddEstimate(-left.
m_imaginary
, right.
m_imaginary
, result_realpart);
1450
double result_imaginarypart = addend.
m_imaginary
;
1451
result_imaginarypart = double.MultiplyAddEstimate(left.m_real, right.
m_imaginary
, result_imaginarypart);
1452
result_imaginarypart = double.MultiplyAddEstimate(left.
m_imaginary
, right.m_real, result_imaginarypart);
1621
if (value.
m_imaginary
!= 0)
1632
if (value.
m_imaginary
!= 0)
1643
if (value.
m_imaginary
!= 0)
1654
double actualResult = (value.
m_imaginary
!= 0) ? double.NaN : value.m_real;
1660
Half actualResult = (value.
m_imaginary
!= 0) ? Half.NaN : (Half)value.m_real;
1666
if (value.
m_imaginary
!= 0)
1677
if (value.
m_imaginary
!= 0)
1688
if (value.
m_imaginary
!= 0)
1699
if (value.
m_imaginary
!= 0)
1710
if (value.
m_imaginary
!= 0)
1721
if (value.
m_imaginary
!= 0)
1732
if (value.
m_imaginary
!= 0)
1743
float actualResult = (value.
m_imaginary
!= 0) ? float.NaN : (float)value.m_real;
1749
if (value.
m_imaginary
!= 0)
1760
if (value.
m_imaginary
!= 0)
1771
if (value.
m_imaginary
!= 0)
1782
if (value.
m_imaginary
!= 0)
1793
if (value.
m_imaginary
!= 0)
2227
m_imaginary
.TryFormat(Unsafe.BitCast<Span<TChar>, Span<char>>(destination.Slice(2)), out imaginaryChars, format, provider) :
2228
m_imaginary
.TryFormat(Unsafe.BitCast<Span<TChar>, Span<byte>>(destination.Slice(2)), out imaginaryChars, format, provider))