func TestPrimeS(t *testing.T) { var f big.Int for _, tc := range tcs { if fs := prime.FactorialS(&f, ps, tc.n).String(); fs != tc.s { t.Errorf("%d! incorrect. expected %s, got %s", tc.n, tc.s, fs) } } }
func BenchmarkS1e5(b *testing.B) { var f big.Int for i := 0; i < b.N; i++ { prime.FactorialS(&f, ps, 1e5) } }