In Cool§

See primary documentation in context for method conj

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␤»

In role Numeric§

See primary documentation in context for method conj

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

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

In Complex§

See primary documentation in context for method conj

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␤»