Left: | ||
Right: |
LEFT | RIGHT |
---|---|
(Both sides are equal) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package math | 5 package math |
6 | 6 |
7 // Sqrt returns the square root of x. | 7 // Sqrt returns the square root of x. |
8 // | 8 // |
9 // Special cases are: | 9 // Special cases are: |
10 // Sqrt(+Inf) = +Inf | 10 // Sqrt(+Inf) = +Inf |
11 // Sqrt(±0) = ±0 | 11 // Sqrt(±0) = ±0 |
12 // Sqrt(x < 0) = NaN | 12 // Sqrt(x < 0) = NaN |
13 // Sqrt(NaN) = NaN | 13 // Sqrt(NaN) = NaN |
14 func Sqrt(x float64) float64 { return sqrtGo(x) } | 14 func Sqrt(x float64) float64 { return sqrtGo(x) } |
LEFT | RIGHT |