Home
last modified time | relevance | path

Searched refs:abs_tol (Results 1 – 12 of 12) sorted by relevance

/external/fonttools/Tests/misc/
Dpy23_test.py289 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/
Dmathmodule.c.h492 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()
Dcmathmodule.c.h858 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/
Dtest_math.py126 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 …]
Dtest_cmath.py609 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/
Dpy23.py278 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/
Dcmath.rst212 .. 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)``.
Dmath.rst118 .. 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/
Dmathmodule.c2281 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()
Dcmathmodule.c1192 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/
Drun_tests.py1301 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/
D3.5.rst631 >>> math.isclose(a, b, abs_tol=0.00003)
633 >>> math.isclose(a, b, abs_tol=0.00001)