MCPcopy Index your code
hub / github.com/RustPython/RustPython / RelativeError

Method RelativeError

Lib/test/test_math.py:1543–1546  ·  view source on GitHub ↗
(res, ex)

Source from the content-addressed store, hash-verified

1541 return DotExample(x, y, DotExact(x, y), Condition(x, y))
1542
1543 def RelativeError(res, ex):
1544 x, y, target_sumprod, condition = ex
1545 n = DotExact(list(x) + [-res], list(y) + [1])
1546 return fabs(n / target_sumprod)
1547
1548 def Trial(dotfunc, c, n):
1549 ex = GenDot(10, c)

Callers

nothing calls this directly

Calls 2

fabsFunction · 0.90
listClass · 0.85

Tested by

no test coverage detected