diff options
Diffstat (limited to 'libgo/go/math/sqrt_port.go')
-rw-r--r-- | libgo/go/math/sqrt_port.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/math/sqrt_port.go b/libgo/go/math/sqrt_port.go index 6f35a38..148239b 100644 --- a/libgo/go/math/sqrt_port.go +++ b/libgo/go/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) +} |