Lines Matching refs:abs_tol
106 def ulp_abs_check(expected, got, ulp_tol, abs_tol):
116 # Succeed if either abs_error <= abs_tol or ulp_error <= ulp_tol.
117 if abs_error <= abs_tol or ulp_error <= ulp_tol:
122 return fmt.format(abs_error, ulp_error, abs_tol, ulp_tol)
174 def result_check(expected, got, ulp_tol=5, abs_tol=0.0):
208 failure = ulp_abs_check(expected, got, ulp_tol, abs_tol)
239 def ftest(self, name, got, expected, ulp_tol=5, abs_tol=0.0):
248 failure = result_check(expected, got, ulp_tol, abs_tol)
465 self.ftest('cos(-pi/2)', math.cos(-math.pi/2), 0, abs_tol=math.ulp(1))
467 self.ftest('cos(pi/2)', math.cos(math.pi/2), 0, abs_tol=math.ulp(1))
1562 abs_tol=math.ulp(1))
1721 ulp_tol, abs_tol = 5, 0.0
1723 failure = result_check(er, result, ulp_tol, abs_tol)
1755 ulp_tol, abs_tol = 5, 0.0
1769 abs_tol = 1e-15
1790 failure = result_check(expected, got, ulp_tol, abs_tol)
2151 self.assertIsClose(1, 1, rel_tol=1e-100, abs_tol=-1e10)
2161 self.assertAllClose(identical_examples, rel_tol=0.0, abs_tol=0.0)
2178 # these should be close to abs_tol=1e-8
2179 self.assertAllClose(near_zero_examples, abs_tol=1e-8)
2184 self.assertIsClose(INF, INF, abs_tol=0.0)
2186 self.assertIsClose(NINF, NINF, abs_tol=0.0)
2201 self.assertAllNotClose(not_close_examples, abs_tol=0.999999999999999)