summaryrefslogtreecommitdiff
path: root/src/pkg/math/cmplx/sqrt.go
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
committerMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
commit8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch)
tree4449f2036cccf162e8417cc5841a35815b3e7ac5 /src/pkg/math/cmplx/sqrt.go
parentc8bf49ef8a92e2337b69c14b9b88396efe498600 (diff)
downloadgolang-8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1.tar.gz
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'src/pkg/math/cmplx/sqrt.go')
-rw-r--r--src/pkg/math/cmplx/sqrt.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/math/cmplx/sqrt.go b/src/pkg/math/cmplx/sqrt.go
index 179b5396a..4ef6807ad 100644
--- a/src/pkg/math/cmplx/sqrt.go
+++ b/src/pkg/math/cmplx/sqrt.go
@@ -54,6 +54,7 @@ import "math"
// IEEE -10,+10 1,000,000 2.9e-16 6.1e-17
// Sqrt returns the square root of x.
+// The result r is chosen so that real(r) ≥ 0 and imag(r) has the same sign as imag(x).
func Sqrt(x complex128) complex128 {
if imag(x) == 0 {
if real(x) == 0 {