/external/fonttools/Tests/misc/ |
D | py23_test.py | 289 self.assertIsClose(1, 1, rel_tol=1e-100, abs_tol=-1e10) 300 self.assertAllClose(identical_examples, rel_tol=0.0, abs_tol=0.0) 320 self.assertAllClose(near_zero_examples, abs_tol=1e-8) 325 self.assertIsClose(INF, INF, abs_tol=0.0) 327 self.assertIsClose(NINF, NINF, abs_tol=0.0) 343 self.assertAllNotClose(not_close_examples, abs_tol=0.999999999999999)
|
/external/python/cpython3/Modules/clinic/ |
D | mathmodule.c.h | 492 double abs_tol); 503 double abs_tol = 0.0; in math_isclose() local 507 &a, &b, &rel_tol, &abs_tol)) { in math_isclose() 510 _return_value = math_isclose_impl(module, a, b, rel_tol, abs_tol); in math_isclose()
|
D | cmathmodule.c.h | 858 double rel_tol, double abs_tol); 869 double abs_tol = 0.0; in cmath_isclose() local 873 &a, &b, &rel_tol, &abs_tol)) { in cmath_isclose() 876 _return_value = cmath_isclose_impl(module, a, b, rel_tol, abs_tol); in cmath_isclose()
|
/external/python/cpython3/Lib/test/ |
D | test_math.py | 126 def ulp_abs_check(expected, got, ulp_tol, abs_tol): argument 137 if abs_error <= abs_tol or ulp_error <= ulp_tol: 142 return fmt.format(abs_error, ulp_error, abs_tol, ulp_tol) 194 def result_check(expected, got, ulp_tol=5, abs_tol=0.0): argument 228 failure = ulp_abs_check(expected, got, ulp_tol, abs_tol) 249 def ftest(self, name, got, expected, ulp_tol=5, abs_tol=0.0): argument 258 failure = result_check(expected, got, ulp_tol, abs_tol) 452 self.ftest('cos(-pi/2)', math.cos(-math.pi/2), 0, abs_tol=ulp(1)) 454 self.ftest('cos(pi/2)', math.cos(math.pi/2), 0, abs_tol=ulp(1)) 1181 abs_tol=ulp(1)) [all …]
|
D | test_cmath.py | 609 self.isclose(1j, 1j, abs_tol=1j) 612 self.isclose(1j, 1j, rel_tol=1j, abs_tol=1j) 635 self.assertAllClose(near_zero_examples, abs_tol=1.5e-03) 636 self.assertAllNotClose(near_zero_examples, abs_tol=0.5e-03) 638 self.assertIsClose(0.001-0.001j, 0.001+0.001j, abs_tol=2e-03) 639 self.assertIsNotClose(0.001-0.001j, 0.001+0.001j, abs_tol=1e-03)
|
/external/fonttools/Lib/fontTools/misc/ |
D | py23.py | 278 def isclose(a, b, rel_tol=1e-09, abs_tol=0): argument 284 if rel_tol < 0 or abs_tol < 0: 307 (diff <= abs_tol))
|
/external/python/cpython3/Doc/library/ |
D | cmath.rst | 212 .. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) 226 *abs_tol* is the minimum absolute tolerance -- useful for comparisons near 227 zero. *abs_tol* must be at least zero. 230 ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
|
D | math.rst | 118 .. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) 132 *abs_tol* is the minimum absolute tolerance -- useful for comparisons near 133 zero. *abs_tol* must be at least zero. 136 ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
|
/external/python/cpython3/Modules/ |
D | mathmodule.c | 2281 double abs_tol) in math_isclose_impl() argument 2287 if (rel_tol < 0.0 || abs_tol < 0.0 ) { in math_isclose_impl() 2319 (diff <= abs_tol)); in math_isclose_impl()
|
D | cmathmodule.c | 1192 double rel_tol, double abs_tol) in cmath_isclose_impl() argument 1198 if (rel_tol < 0.0 || abs_tol < 0.0 ) { in cmath_isclose_impl() 1231 (diff <= abs_tol)); in cmath_isclose_impl()
|
/external/grpc-grpc/tools/run_tests/ |
D | run_tests.py | 1301 def isclose(a, b, rel_tol=1e-09, abs_tol=0.0): argument 1302 return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.5.rst | 631 >>> math.isclose(a, b, abs_tol=0.00003) 633 >>> math.isclose(a, b, abs_tol=0.00001)
|