Complex Numbers

While the BCL teams were at it, adding System.Numerics with the BigInteger type, they also added a complex number struct. Because most readers won’t have to deal with complex numbers on a day-to-day basis, we restrict ourselves to a small refresher on the concept of complex numbers in Figure 26.14, as well as a simple code fragment.


FIGURE 26.14 Brief recap of complex number theory.

Creation of a Complex value can be done in a number of ways. One is to specify real and imaginary parts of the number to the constructor, both of which are typed using double floating-point precision values. Math-savvy readers will recall there’s another ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.