randomness icon indicating copy to clipboard operation
randomness copied to clipboard

比特样本数据不支持100 000 000

Open deanz-io opened this issue 4 years ago • 1 comments

参考GM/T 0005-2021检测规范附录A.3的要求比特样本数据需要支持100 000 000比特

func lastPow2(N int) (n, p int, err error) {
	maxdim := 1 << 20
	if N < 2 {
		return n, p, fmt.Errorf("fft input length must be >= 2")
	} else if N > maxdim {
		return n, p, fmt.Errorf("fft input length must be < %d. It is: %d", maxdim, N)
	}
	i := 2
	for p = 1; ; p++ {
		j := i << 1
		if j > N {
			return i, p, nil
		}
		i = j
	}
}

maxdim应该修改为:

maxdim := 100000000

deanz-io avatar Nov 10 '22 01:11 deanz-io

将于 1.3.3 进行修复

Trisia avatar Nov 11 '22 01:11 Trisia