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

Method roots

Lib/test/test_dis.py:2078–2082  ·  view source on GitHub ↗
(a, b, c)

Source from the content-addressed store, hash-verified

2076 @requires_debug_ranges()
2077 def test_co_positions_with_lots_of_caches(self):
2078 def roots(a, b, c):
2079 d = b**2 - 4 * a * c
2080 yield (-b - cmath.sqrt(d)) / (2 * a)
2081 if d:
2082 yield (-b + cmath.sqrt(d)) / (2 * a)
2083 code = roots.__code__
2084 ops = code.co_code[::2]
2085 cache_opcode = opcode.opmap["CACHE"]

Callers

nothing calls this directly

Calls 1

sqrtMethod · 0.45

Tested by

no test coverage detected