Documentation for method conj assembled from the following pages:

Class: Numeric §

From Numeric

(Numeric) method conj §

multi method conj(Numeric:D --> Numeric:D)

Returns the complex conjugate of the number. Returns the number itself for real numbers.

Class: Complex §

From Complex

(Complex) method conj §

Defined as:

method conj(Complex:D: --> Complex:D)

Returns the complex conjugate of the invocant (that is, the number with the sign of the imaginary part negated).

say (1-4i).conj;                # OUTPUT: «1+4i␤»

Class: Cool §

From Cool

(Cool) method conj §

Defined as:

method conj()

Coerces the invocant to Numeric and returns the complex conjugate (that is, the number with the sign of the imaginary part negated).

say (1+2i).conj;        # OUTPUT: «1-2i␤»