summaryrefslogtreecommitdiff
path: root/src/pkg/math/sqrt_port.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
commitd39f5aa373a4422f7a5f3ee764fb0f6b0b719d61 (patch)
tree1833f8b72a4b3a8f00d0d143b079a8fcad01c6ae /src/pkg/math/sqrt_port.go
parent8652e6c371b8905498d3d314491d36c58d5f68d5 (diff)
downloadgolang-upstream/58.tar.gz
Imported Upstream version 58upstream/58
Diffstat (limited to 'src/pkg/math/sqrt_port.go')
-rw-r--r--src/pkg/math/sqrt_port.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkg/math/sqrt_port.go b/src/pkg/math/sqrt_port.go
index 6f35a383d..148239bcf 100644
--- a/src/pkg/math/sqrt_port.go
+++ b/src/pkg/math/sqrt_port.go
@@ -50,7 +50,7 @@ package math
// If (2) is false, then q = q ; otherwise q = q + 2 .
// i+1 i i+1 i
//
-// With some algebric manipulation, it is not difficult to see
+// With some algebraic manipulation, it is not difficult to see
// that (2) is equivalent to
// -(i+1)
// s + 2 <= y (3)
@@ -141,3 +141,7 @@ func sqrtGo(x float64) float64 {
ix = q>>1 + uint64(exp-1+bias)<<shift // significand + biased exponent
return Float64frombits(ix)
}
+
+func sqrtGoC(f float64, r *float64) {
+ *r = sqrtGo(f)
+}