summaryrefslogtreecommitdiff
path: root/libgo/go/math/all_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/math/all_test.go')
-rw-r--r--libgo/go/math/all_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgo/go/math/all_test.go b/libgo/go/math/all_test.go
index cdea8035f9a..0d8b10f67fa 100644
--- a/libgo/go/math/all_test.go
+++ b/libgo/go/math/all_test.go
@@ -2281,6 +2281,13 @@ func TestLog2(t *testing.T) {
t.Errorf("Log2(%g) = %g, want %g", vflogSC[i], f, logSC[i])
}
}
+ for i := -1074; i <= 1023; i++ {
+ f := Ldexp(1, i)
+ l := Log2(f)
+ if l != float64(i) {
+ t.Errorf("Log2(2**%d) = %g, want %d", i, l, i)
+ }
+ }
}
func TestModf(t *testing.T) {