Commit 313eaac8 authored by Christoph Conrads's avatar Christoph Conrads

Show block size, retention ratio in output

parent 86248e74
......@@ -114,7 +114,7 @@ find_awc_swb_prngs()
echo "Found $num_generators $type parameter combinations"
echo 'type b r s t log2period log10period'
echo 'type b r s t p rr log2period log10period'
while read gen
local b="$(awk '{print $2}' <<<"$gen")"
......@@ -9,6 +9,7 @@
import matplotlib.pyplot as pp
import numpy as np
import scipy.optimize
import sympy.ntheory
import sys
if len(sys.argv) < 5:
......@@ -56,9 +57,12 @@ c = np.asscalar(result.x)
y_min = (b/2) / (b+1)
# Compute the smallest x rounded up such that 1/b * e^(c(x-1)) >= y_min
k = int(np.ceil(np.log(y_min*b) / c + 1))
p = sympy.ntheory.nextprime(k*r)
rr = r / p
print('{:4s} {:2d} {:2d} {:2d} {:3d}'.format(kind, w, r, s, k))
text_fmt = '{:4s} {:2d} {:2d} {:2d} {:3d} {:4d} {:5.3f}'
print(text_fmt.format(kind, w, r, s, k, p, rr))
zs = np.exp(c * (xs-1)) / b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment