This is an automatically generated file.
Part 1
Part 2
def test_sqrt_tiny(tlist):
"""Check sqrt(x)**2 for values near the underflow threshold."""
for z in tlist:
if z != ZERO:
sqrt_z = sqrt(z)
y = sqrt_z * sqrt_z
if ((y / (ONE - B * SAFE_ULPS_OF_ONE) < z)
or y > (ONE + B * SAFE_ULPS_OF_ONE) * z):
if sqrt_z > ULP_OF_ONE_MINUS:
bad_cond(err_serious, "")
else:
bad_cond(err_defect, "")
print("Comparison alleges that what prints as z = {:0.17e}"
.format(z))
print(" is too far from sqrt(z) ^ 2 = {:0.17e} .".format(y))
return
Part 3