This is an automatically generated file.
Part 1
Part 2
def num_theory_sqrt_value(x, D, Q, z, z1):
"""Test utility."""
x = z1 * Q
x = floor(ONE_HALF - x / B) * B + x
Q = (Q - x * z) / B + x * x * (D / B)
z = z - TWO * x * D
Part 3
if z <= ZERO:
if ultra_verbose:
print("\t\t\tnum_theory_sqrt_value: z = {:.17} <= ZERO".format(z))
z = - z
z1 = - z1
Part 4
D = B * D
if ultra_verbose:
print("\tnew D = {:.17e} Q = {:.17e}".format(D, Q))
return x, D, Q, z, z1
Part 5