The constant H
is an artifact of the
computation \( B = 1 \) for log arithmetic.
We use H
when scaling down by the radix
and ONE_OVER_H
when scaling up.
This simple routine substitutes \( 2 \) for the
radix, when the radix is less than \( 1 \).
def compute_H_and_inverse():
"""Return min(1/B, 1/2) and reciprocal, noting H is a fraction."""
if B < TWO:
h_inv = TWO
else:
h_inv = B
return ONE / h_inv, h_inv