diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-02-09 08:19:58 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-02-09 08:19:58 +0000 |
commit | 94252f4bcc0a3f487b804ce535cb77b8bef4db83 (patch) | |
tree | 7ca86535c5a6b99d4cc432ba5cfddabc5ee4ea16 /libgo/go/math/dim.go | |
parent | cd6368115dbd75d9187877097c48a0d8d4c04fd4 (diff) | |
download | gcc-94252f4bcc0a3f487b804ce535cb77b8bef4db83.zip gcc-94252f4bcc0a3f487b804ce535cb77b8bef4db83.tar.gz gcc-94252f4bcc0a3f487b804ce535cb77b8bef4db83.tar.bz2 |
libgo: Update to weekly.2012-02-07.
From-SVN: r184034
Diffstat (limited to 'libgo/go/math/dim.go')
-rw-r--r-- | libgo/go/math/dim.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libgo/go/math/dim.go b/libgo/go/math/dim.go index 24a84e6..37ab538 100644 --- a/libgo/go/math/dim.go +++ b/libgo/go/math/dim.go @@ -30,13 +30,11 @@ func Max(x, y float64) float64 { } func max(x, y float64) float64 { - // TODO(rsc): Remove manual inlining of IsNaN, IsInf - // when compiler does it for us // special cases switch { - case x > MaxFloat64 || y > MaxFloat64: // IsInf(x, 1) || IsInf(y, 1): + case IsInf(x, 1) || IsInf(y, 1): return Inf(1) - case x != x || y != y: // IsNaN(x) || IsNaN(y): + case IsNaN(x) || IsNaN(y): return NaN() case x == 0 && x == y: if Signbit(x) { @@ -61,13 +59,11 @@ func Min(x, y float64) float64 { } func min(x, y float64) float64 { - // TODO(rsc): Remove manual inlining of IsNaN, IsInf - // when compiler does it for us // special cases switch { - case x < -MaxFloat64 || y < -MaxFloat64: // IsInf(x, -1) || IsInf(y, -1): + case IsInf(x, -1) || IsInf(y, -1): return Inf(-1) - case x != x || y != y: // IsNaN(x) || IsNaN(y): + case IsNaN(x) || IsNaN(y): return NaN() case x == 0 && x == y: if Signbit(x) { |