pkg/math: undo manual inlining of IsInf and IsNaN
R=rsc
CC=golang-dev
https://golang.org/cl/5484076
diff --git a/src/pkg/math/sqrt.go b/src/pkg/math/sqrt.go
index d0b5535..21336df 100644
--- a/src/pkg/math/sqrt.go
+++ b/src/pkg/math/sqrt.go
@@ -100,10 +100,8 @@
// Sqrt(NaN) = NaN
func sqrt(x float64) float64 {
// special cases
- // TODO(rsc): Remove manual inlining of IsNaN, IsInf
- // when compiler does it for us
switch {
- case x == 0 || x != x || x > MaxFloat64: // x == 0 || IsNaN(x) || IsInf(x, 1):
+ case x == 0 || IsNaN(x) || IsInf(x, 1):
return x
case x < 0:
return NaN()