Checking the parameter recipe exactly instead of assuming it works
Use this recipe only for integer n>=20 and fixed integer beta>=1; send smaller n directly to exhaustive fallback before computing any logarithms or reciprocals. Compute lambda and nu as the least nonnegative integers with n<=2^lambda and lambda<=2^nu. Choose the greatest nonnegative integer r satisfying r^2*nu^4<=lambda, Q by integer division, and R using an integer ceiling square root. Reject failed size, interval or balance checks before computing the tail. Its exact denominator is (2r)^Q and numerator is sum over excluded j of binom(Q,j)*(r-1)^j*(r+1)^(Q-j); compare with epsilon by cross-multiplication. Even n=2^1024,beta=1 gives r=0,Q=0,R=128 and fails. Eventual feasibility and an exhaustive fallback do not imply practicality.
0
1
Tags
Math