This is an automatically generated file.
Part 1
Part 2
def extreme_z_to_q():
"""Test A and 1/A to powers reaching 1/C and C.
A is 2 or 10. C is 1/B**k, tiny but well away from underflow.
C is an integer power of 1/A, so try the four possibilities of
A and 1/A producing C and 1/C.
Basic 5460-5490
"""
global pow_err_cnt # var used by power tests
print("Testing powers z^q at four nearly extreme values.")
pow_err_cnt = 0 # this test resets the global value to 0 without restore.
Part 3
q = floor(ONE_HALF - log(C) / log(A)) # C is a power of B and thus A
for z in [A, ONE_OVER_A]:
x = ONE_OVER_C
test_power_result(x, z, q)
q = -q
x = C
test_power_result(x, z, q)
print_if_err_cnt_positive()
if pow_err_cnt == 0:
print(" ... no discrepancies found.")
return
Part 4