Computer Algebra Kit (c) 1993,00 by Comp.Alg.Objects. All Rights Reserved.

**Maturity Index:** Relatively immature

+Returns a new complex object with real part set toreal:aReal

+Returns a new complex object with real part set toreal:aRealimaginary:anotherReal

-Returns a new copy of the complex object.copy

-Returns a new copy of the complex object; sendsdeepCopy

-Returns the real part of a complex number.real

-Returns the imaginary part of a complex number.imaginary

- (BOOL)Whether the imaginary part is equal to zero.isReal

- (BOOL)Whether thenotReal

- (unsigned)Returns a small integer that is the same for objects that are equal in the sense ofhash

- (BOOL)Whether real and imaginary parts are equal to each other.isEqual:b

-Returns a new reference to the object if it is real. Otherwise, returns a new object that is equal to the complex conjugate of the object. The conjugate ofconjugate

-Returns a newnorm

-If the imaginary part of the object is zero, this method returns a new reference to the real part of the object.asReal

-Returns a new complex object with real and imaginary part equal to zero.zero

- (BOOL)Whether real and imaginary part are equal to zero.isZero

- (BOOL)Whether real and imaginary parts are opposite to each other.isOpposite:b

-Returns a new complex number, by negating real and imaginary parts.negate

-Returns a new complex number, by doubling real and imaginary parts.double

-Returns the sum of the complex numbers; adds real and imaginary parts together.add:b

-Returns the difference of the complex numbers; subtracts real and imaginary parts from each other.subtract:b

-Returns a new reference to the imaginary unit.I

-Returns a new object with real part equal to one and imaginary part equal to zero.one

- (BOOL)Whether the complex object is a multiplicative unit. The complex units consist of the real units and the real units multiplied by the imaginary unitisOne

- (BOOL)Whether the complex object is a multiplicative unit. The complex units consist of the real units and the real units multiplied by the imaginary unitisMinusOne

- (BOOL)Whether the complex object is a multiplicative unit. The complex units consist of the real units and the real units multiplied by the imaginary unitisUnit

-Returns the complex number multiplied by itself, computed by the rule :square

(a+I b)^2 == (a^2 - b^2) + I (2 a b)

-Returns the product of the two complex numbers, computed by the rule :multiply:b

(a+I b)(c+I d) == (ac-bd) + I (ad+bc)

-Returns the complex number raised to thepower:(int)n

-Returns the exact quotient of the complex number by the complex numberdivide:b

-Returns the conjugate of the complex number divided by its norm, orinverse

-Returns the quotient on division byquotient:b

**Note:** I'm not sure about the algorithm I'm using here !

-Computes the remainder, and ifremainder:bquotient:(id *)q

-If both objects are real, returns a complex object with real part set to the (real) gcd of the objects. Otherwise, computes the greatest common divisor by the Euclidean algorithm.gcd:b

-Prints the number toprintOn:(IOD)aFile