summaryrefslogtreecommitdiff
path: root/src/pkg/math/sqrt.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/sqrt.go')
-rw-r--r--src/pkg/math/sqrt.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pkg/math/sqrt.go b/src/pkg/math/sqrt.go
new file mode 100644
index 000000000..ff5cc91e0
--- /dev/null
+++ b/src/pkg/math/sqrt.go
@@ -0,0 +1,14 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package math
+
+// Sqrt returns the square root of x.
+//
+// Special cases are:
+// Sqrt(+Inf) = +Inf
+// Sqrt(±0) = ±0
+// Sqrt(x < 0) = NaN
+// Sqrt(NaN) = NaN
+func Sqrt(x float64) float64 { return sqrtGo(x) }