summaryrefslogtreecommitdiff
path: root/src/pkg/math/sqrt.go
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:28:53 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:28:53 +0100
commitb39e15dde5ec7b96c15da9faf4ab5892501c1aae (patch)
tree718cede1f6ca97d082c6c40b7dc3f4f6148253c0 /src/pkg/math/sqrt.go
parent04b08da9af0c450d645ab7389d1467308cfc2db8 (diff)
downloadgolang-upstream/1.1_hg20130323.tar.gz
Imported Upstream version 1.1~hg20130323upstream/1.1_hg20130323
Diffstat (limited to 'src/pkg/math/sqrt.go')
-rw-r--r--src/pkg/math/sqrt.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pkg/math/sqrt.go b/src/pkg/math/sqrt.go
index 21336df2a..1bd4437f1 100644
--- a/src/pkg/math/sqrt.go
+++ b/src/pkg/math/sqrt.go
@@ -4,15 +4,6 @@
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
-
// The original C code and the long comment below are
// from FreeBSD's /usr/src/lib/msun/src/e_sqrt.c and
// came with this notice. The go code is a simplified
@@ -98,6 +89,8 @@ func Sqrt(x float64) float64
// Sqrt(±0) = ±0
// Sqrt(x < 0) = NaN
// Sqrt(NaN) = NaN
+func Sqrt(x float64) float64
+
func sqrt(x float64) float64 {
// special cases
switch {