This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Assignment #9 CS 170, Spring 2006 Due Friday, March 31 Part 1 (practice exercises) 1. Read chapter 10 in the text. 2. Do review questions 5 and 7, and programming exercises 1, 2, 6, and 7 on p.496–498. Part 2 (to turn in) 1. For real numbers, the symbol √- 1 is not defined, as one may only take the square root of a nonnegative number. On the other hand, we can construct an entirely new set of numbers if we assume that i . = √- 1 is defined. To emphasize that i is not a real number, we say that i is an imaginary number; the set of numbers that we obtain is called the complex numbers , denoted C . Every complex number z ∈ C can be written in the form z = a + bi, where a and b are real numbers. The sum of two complex numbers is given by ( a + bi ) + ( c + di ) . = ( a + c ) + ( b + d ) i (1) We can view a complex number as essentially an ordered two–tuple of real numbers, much like a two–dimensional vector. The above formula for addition of complex numbers corresponds to the addition of two vectors (components are added). Similarly, the negation of a complex number is defined just as with vectors:- ( a + bi ) . = (- a ) + (- b ) i. (2) Unlike two–dimensional vectors, however, we may define a product of two com- plex numbers: ( a + bi )( c + di ) . = ( ac- bd ) + ( ad + bc ) i (3) (this formula is forced on us if we require that multiplication distributes over addition). In addition to the basic arithmetic operations given by equations (1), (2), and (3), there are other common operations. The conjugate of a complex number is defined to be the complex number ( a + bi ) ....
View Full Document
- Spring '06
- Complex number, Complex class, code fragment Complex