diff options
Diffstat (limited to 'libgo/go/math/hypot.go')
-rw-r--r-- | libgo/go/math/hypot.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libgo/go/math/hypot.go b/libgo/go/math/hypot.go index 5c7c3a832b3..57d8e343720 100644 --- a/libgo/go/math/hypot.go +++ b/libgo/go/math/hypot.go @@ -19,13 +19,11 @@ func Hypot(p, q float64) float64 { } func hypot(p, q float64) float64 { - // TODO(rsc): Remove manual inlining of IsNaN, IsInf - // when compiler does it for us // special cases switch { - case p < -MaxFloat64 || p > MaxFloat64 || q < -MaxFloat64 || q > MaxFloat64: // IsInf(p, 0) || IsInf(q, 0): + case IsInf(p, 0) || IsInf(q, 0): return Inf(1) - case p != p || q != q: // IsNaN(p) || IsNaN(q): + case IsNaN(p) || IsNaN(q): return NaN() } if p < 0 { |