Skip to content

Commit 8d7aaa5

Browse files
author
Jan-Olof Hendig
committed
Added documentation for sqrt
1 parent 0ed5cba commit 8d7aaa5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/Type/Complex.pod6

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,19 @@ sign of the imaginary part negated).
158158
159159
say (1-4i).conj; # OUTPUT: «1+4i␤»
160160
161+
=head2 method sqrt
162+
163+
Defined as:
164+
165+
method sqrt(Complex:D: --> Complex:D)
166+
167+
Returns the complex square root of the invocant, i.e. the root
168+
where the real part is ≥ 0 and the imaginary part has the same
169+
sign as the imaginary part of the invocant.
170+
171+
say (3-4i).sqrt; # OUTPUT: «2-1i␤»
172+
say (-3+4i).sqrt; # OUTPUT: «1+2i␤»
173+
161174
=head2 method gist
162175
163176
Defined as:

0 commit comments

Comments
 (0)