• 大小: 0.06M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: 其他
  • 标签: 其他  

资源简介


NIST软件包太难用了,用python实现了,每个单独的py文件都是可以运行的

资源截图

代码片段和文件信息

#!/usr/bin/env python

from math import gammae

# Continued Fraction Computation
# 6.5.31 Handbook of Mathematical Functions page 263
#    Recursive implementation
def upper_incomplete_gamma(axd=0iterations=100):
    if d == iterations:
        if ((d % 2) == 1):
            return 1.0 # end iterations
        else:
            m = d/2
            return x + (m-a)
    if d == 0:
        result = ((x**a) * (e**(-x)))/upper_incomplete_gamma(axd=d+1)
        return result
    elif ((d % 2) == 1):
        m = 1.0+((d-1.0)/2.0)
        return x+ ((m-a)/(upper_incomplete_gamma(axd=d+1)))
    else:
        m = d/2
        return 1+(m/(upper_incomplete_gamma(axd=d+1)))

# 6.5.31 Handbook of Mathematical Functions page 263
#    Recursive implementation
def upper_incomplete_gamma2(axd=0iterations=100):
    if d == iterations:
        return 1.0 
    if d == 0:
        result = ((x**a) * (e**(-x)))/upper_incomplete_gamma2(axd=d+1)
        return result
    else:
        m = (d*2)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      1157  2017-11-28 03:51  sp800_22_tests-master\.gitignore

     文件        205  2018-04-19 16:01  sp800_22_tests-master\bit.txt

    .......      1967  2017-11-28 03:51  sp800_22_tests-master\gamma_functions.py

     文件       6181  2018-04-19 11:14  sp800_22_tests-master\gf2matrix.py

    .......     18046  2017-11-28 03:51  sp800_22_tests-master\LICENSE

     文件      11068  2018-04-19 20:14  sp800_22_tests-master\main.py

    .......      5911  2017-11-28 03:51  sp800_22_tests-master\README.md

     文件       3005  2018-04-19 13:56  sp800_22_tests-master\sp800_22_approximate_entropy_test.py

     文件       3321  2018-04-19 13:37  sp800_22_tests-master\sp800_22_binary_matrix_rank_test.py

     文件       3547  2018-04-19 19:25  sp800_22_tests-master\sp800_22_cumulative_sums_test.py

     文件       2069  2018-04-19 11:03  sp800_22_tests-master\sp800_22_dft_test.py

     文件       2898  2018-04-19 16:49  sp800_22_tests-master\sp800_22_frequency_within_block_test.py

     文件       3985  2018-04-19 13:49  sp800_22_tests-master\sp800_22_linear_complexity_test.py

     文件       3932  2018-04-19 11:08  sp800_22_tests-master\sp800_22_longest_run_ones_in_a_block_test.py

     文件       3747  2018-04-19 13:46  sp800_22_tests-master\sp800_22_maurers_universal_test.py

     文件       1804  2018-04-19 11:05  sp800_22_tests-master\sp800_22_monobit_test.py

     文件       5976  2018-04-19 14:03  sp800_22_tests-master\sp800_22_non_overlapping_template_matching_test.py

     文件       3760  2018-04-19 20:15  sp800_22_tests-master\sp800_22_overlapping_template_matching_test.py

     文件       4380  2018-04-19 13:58  sp800_22_tests-master\sp800_22_random_excursion_test.py

     文件       2705  2018-04-19 14:00  sp800_22_tests-master\sp800_22_random_excursion_variant_test.py

     文件       2215  2018-04-19 10:54  sp800_22_tests-master\sp800_22_runs_test.py

     文件       3280  2018-04-19 13:53  sp800_22_tests-master\sp800_22_serial_test.py

     文件       5523  2018-04-19 18:48  sp800_22_tests-master\sp800_22_tests.py

     文件       2037  2018-04-18 21:05  sp800_22_tests-master\__pycache__\gamma_functions.cpython-35.pyc

     文件       4167  2018-04-19 13:37  sp800_22_tests-master\__pycache__\gf2matrix.cpython-35.pyc

     文件       2129  2018-04-19 17:04  sp800_22_tests-master\__pycache__\sp800_22_approximate_entropy_test.cpython-35.pyc

     文件       2259  2018-04-19 17:04  sp800_22_tests-master\__pycache__\sp800_22_binary_matrix_rank_test.cpython-35.pyc

     文件       2266  2018-04-19 19:25  sp800_22_tests-master\__pycache__\sp800_22_cumulative_sums_test.cpython-35.pyc

     文件       1459  2018-04-19 17:04  sp800_22_tests-master\__pycache__\sp800_22_dft_test.cpython-35.pyc

     文件       1881  2018-04-19 17:04  sp800_22_tests-master\__pycache__\sp800_22_frequency_within_block_test.cpython-35.pyc

............此处省略15个文件信息

评论

共有 条评论