OSDN Git Service

libgo: Update to weekly.2012-02-07.
[pf3gnuchains/gcc-fork.git] / libgo / go / math / floor.go
index abe6264..b35066e 100644 (file)
@@ -19,9 +19,7 @@ func Floor(x float64) float64 {
 }
 
 func floor(x float64) float64 {
-       // TODO(rsc): Remove manual inlining of IsNaN, IsInf
-       // when compiler does it for us
-       if x == 0 || x != x || x > MaxFloat64 || x < -MaxFloat64 { // x == 0 || IsNaN(x) || IsInf(x, 0)
+       if x == 0 || IsNaN(x) || IsInf(x, 0) {
                return x
        }
        if x < 0 {
@@ -68,9 +66,7 @@ func Trunc(x float64) float64 {
 }
 
 func trunc(x float64) float64 {
-       // TODO(rsc): Remove manual inlining of IsNaN, IsInf
-       // when compiler does it for us
-       if x == 0 || x != x || x > MaxFloat64 || x < -MaxFloat64 { // x == 0 || IsNaN(x) || IsInf(x, 0)
+       if x == 0 || IsNaN(x) || IsInf(x, 0) {
                return x
        }
        d, _ := Modf(x)