randomness_testsuite
randomness_testsuite copied to clipboard
[Cumulative Sums Test] Add/Sub -1 after division instead of before leads to wrong result for test.
According to the NIST Standard 1 needs to be subtracted/added before the division.
This is not the case for following lines: https://github.com/stevenang/randomness_testsuite/blob/7147879859d095a4cac63962efd7a19d4874a630/CumulativeSum.py#L54-L55
It should be:
start = int(floor(0.25 * floor(-length_of_binary_data / abs_max + 1)))
end = int(floor(0.25 * floor(length_of_binary_data / abs_max - 1)))
This is correct for the second sum though: https://github.com/stevenang/randomness_testsuite/blob/7147879859d095a4cac63962efd7a19d4874a630/CumulativeSum.py#L62-L63
Current: 13. Cummulative Sums (Forward) Test (1.0, True) 14. Cummulative Sums (Reverse) Test (1.0, True)
Fixed: 13. Cummulative Sums (Forward) Test (2.2319712527895903e-302, False) 14. Cummulative Sums (Reverse) Test (2.2319712527895903e-302, False)
I can provide the test data (private msg) if needed.
Can this issue be closed, given that it was fixed?