]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: reenable TestFloatAdd32 (used to fail on 32bit platforms)
authorRobert Griesemer <gri@golang.org>
Wed, 4 Mar 2015 16:58:03 +0000 (08:58 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 4 Mar 2015 18:24:53 +0000 (18:24 +0000)
Change-Id: I932c2f1b1d27c437722cd27d2001b085a655c572
Reviewed-on: https://go-review.googlesource.com/6722
Reviewed-by: Alan Donovan <adonovan@google.com>
src/math/big/float.go
src/math/big/float_test.go

index 0ad8312afe3cad2338595c203e7d0bbf03fd7740..62d539b7558de0e7d3b7157fccf9cefbcaaa7674 100644 (file)
@@ -261,34 +261,34 @@ func (z *Float) SetMantExp(mant *Float, exp int) *Float {
 }
 
 // IsNeg reports whether x is negative.
-// A NaN is not negative.
+// A NaN value is not negative.
 func (x *Float) IsNeg() bool {
        return x.neg && x.exp != nanExp
 }
 
-// IsZero reports whether x is +0 or -0.
+// IsZero reports whether x is +0 or -0.
 func (x *Float) IsZero() bool {
        return len(x.mant) == 0 && x.exp == 0
 }
 
 // IsFinite reports whether -Inf < x < Inf.
-// A NaN is not finite.
+// A NaN value is not finite.
 func (x *Float) IsFinite() bool {
        return len(x.mant) != 0 || x.exp == 0
 }
 
-// IsInf reports whether x is +Inf or -Inf.
+// IsInf reports whether x is +Inf or -Inf.
 func (x *Float) IsInf() bool {
        return x.exp == infExp
 }
 
-// IsNaN reports whether x is a NaN.
+// IsNaN reports whether x is a NaN value.
 func (x *Float) IsNaN() bool {
        return x.exp == nanExp
 }
 
 // IsInt reports whether x is an integer.
-// ±Inf and NaN are not considered integers.
+// ±Inf and NaN values are not integers.
 func (x *Float) IsInt() bool {
        if debugFloat {
                validate(x)
index 0be6a957d338a6d4ddbb70ee3ca9faf0ce2ecc2b..cfd41118b76fe393ebd98be9c051057c72bd6c74 100644 (file)
@@ -1058,11 +1058,6 @@ func TestFloatAdd(t *testing.T) {
 // TestFloatAdd32 tests that Float.Add/Sub of numbers with
 // 24bit mantissa behaves like float32 addition/subtraction.
 func TestFloatAdd32(t *testing.T) {
-       // TODO(gri) fix test for 32bit platforms
-       if _W == 32 {
-               return
-       }
-
        // chose base such that we cross the mantissa precision limit
        const base = 1<<26 - 0x10 // 11...110000 (26 bits)
        for d := 0; d <= 0x10; d++ {