1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 func libc_sqrt(float64) float64 __asm__("sqrt")
9 // Sqrt returns the square root of x.
16 func Sqrt(x float64) float64 {
18 // TODO(rsc): Remove manual inlining of IsNaN, IsInf
19 // when compiler does it for us
21 case x == 0 || x != x || x > MaxFloat64: // x == 0 || IsNaN(x) || IsInf(x, 1):