Beispiel #1
0
func TestSplitRecursive(t *testing.T) {
	var f big.Int
	for _, tc := range tcs {
		if fs := splitrec.Factorial(&f, tc.n).String(); fs != tc.s {
			t.Errorf("%d! incorrect.  expected %s, got %s", tc.n, tc.s, fs)
		}
	}
}
Beispiel #2
0
func Benchmark1e5(b *testing.B) {
	var f big.Int
	for i := 0; i < b.N; i++ {
		splitrec.Factorial(&f, 1e5)
	}
}