代码拉取完成,页面将自动刷新
package randomness
import (
"fmt"
"testing"
)
var sampleTestBits100 []bool
func init() {
sampleTestBits100 = B2bitArr([]byte{0xc9, 0xf, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80})
sampleTestBits100 = sampleTestBits100[:100]
}
func TestApproximateEntropyTestSample(t *testing.T) {
p, q := ApproximateEntropyProto(sampleTestBits100, 2)
fmt.Printf("n: %v, P-value: %f, Q-value: %f\n", len(sampleTestBits100), p, q)
if fmt.Sprintf("%.6f", p) != "0.235301" || fmt.Sprintf("%.6f", q) != "0.235301" {
t.FailNow()
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。