mirror of
https://github.com/gonum/gonum.git
synced 2025-10-18 13:10:47 +08:00
stat/combin: allow Binomial tests to pass on GOARCH=386
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
"gonum.org/v1/gonum/floats/scalar"
|
"gonum.org/v1/gonum/floats/scalar"
|
||||||
)
|
)
|
||||||
@@ -81,7 +82,12 @@ func TestBinomial(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
n = 61
|
// Ensure that we have enough space to represent results.
|
||||||
|
// TODO(kortschak): Replace the unsafe.Sizeof(int(0)) expression with
|
||||||
|
// sizeof.Int if https://github.com/golang/go/issues/29982 is
|
||||||
|
// implemented. See also https://github.com/golang/go/issues/40168.
|
||||||
|
n = int(unsafe.Sizeof(int(0))*8 - 3)
|
||||||
|
|
||||||
want big.Int
|
want big.Int
|
||||||
got big.Int
|
got big.Int
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user