/external/fonttools/Tests/misc/ |
D | py23_test.py | 287 self.assertIsClose(1, 1, rel_tol=-1e-100) 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) 308 self.assertAllClose(eight_decimal_places_examples, rel_tol=1e-8) 309 self.assertAllNotClose(eight_decimal_places_examples, rel_tol=1e-9) 318 self.assertAllNotClose(near_zero_examples, rel_tol=0.9) 351 self.assertAllClose(zero_tolerance_close_examples, rel_tol=0.0) 357 self.assertAllNotClose(zero_tolerance_not_close_examples, rel_tol=0.0) 361 self.assertAllClose([(9, 10), (10, 9)], rel_tol=0.1) 369 self.assertAllClose(integer_examples, rel_tol=1e-8) [all …]
|
/external/python/cpython3/Modules/clinic/ |
D | mathmodule.c.h | 491 math_isclose_impl(PyObject *module, double a, double b, double rel_tol, 502 double rel_tol = 1e-09; 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); 868 double rel_tol = 1e-09; 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/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: 305 result = ((diff <= _fabs(rel_tol * a)) or 306 (diff <= _fabs(rel_tol * b)) or
|
/external/python/cpython3/Lib/test/ |
D | test_math.py | 1447 self.assertIsClose(1, 1, rel_tol=-1e-100) 1449 self.assertIsClose(1, 1, rel_tol=1e-100, abs_tol=-1e10) 1459 self.assertAllClose(identical_examples, rel_tol=0.0, abs_tol=0.0) 1466 self.assertAllClose(eight_decimal_places_examples, rel_tol=1e-8) 1467 self.assertAllNotClose(eight_decimal_places_examples, rel_tol=1e-9) 1475 self.assertAllNotClose(near_zero_examples, rel_tol=0.9) 1506 self.assertAllClose(zero_tolerance_close_examples, rel_tol=0.0) 1511 self.assertAllNotClose(zero_tolerance_not_close_examples, rel_tol=0.0) 1515 self.assertAllClose([(9, 10), (10, 9)], rel_tol=0.1) 1522 self.assertAllClose(integer_examples, rel_tol=1e-8) [all …]
|
D | test_cmath.py | 606 self.isclose(1j, 1j, rel_tol=1j) 612 self.isclose(1j, 1j, rel_tol=1j, abs_tol=1j) 622 self.assertAllClose(complex_examples, rel_tol=1e-12) 623 self.assertAllNotClose(complex_examples, rel_tol=1e-13)
|
/external/python/cpython3/Doc/library/ |
D | cmath.rst | 212 .. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) 220 *rel_tol* is the relative tolerance -- it is the maximum allowed difference 222 For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default 224 within about 9 decimal digits. *rel_tol* must be greater than 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) 126 *rel_tol* is the relative tolerance -- it is the maximum allowed difference 128 For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default 130 within about 9 decimal digits. *rel_tol* must be greater than zero. 136 ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
|
/external/python/cpython3/Modules/ |
D | mathmodule.c | 2280 math_isclose_impl(PyObject *module, double a, double b, double rel_tol, in math_isclose_impl() argument 2287 if (rel_tol < 0.0 || abs_tol < 0.0 ) { in math_isclose_impl() 2317 return (((diff <= fabs(rel_tol * b)) || in math_isclose_impl() 2318 (diff <= fabs(rel_tol * a))) || 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() 1229 return (((diff <= rel_tol * _Py_c_abs(b)) || in cmath_isclose_impl() 1230 (diff <= rel_tol * _Py_c_abs(a))) || 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 | 620 >>> math.isclose(a, b, rel_tol=1e-5) 622 >>> math.isclose(a, b, rel_tol=1e-6)
|