MCPcopy Create free account
hub / github.com/Tencent/MMKV / is_float_equal

Function is_float_equal

Python/unit_test.py:109–110  ·  view source on GitHub ↗
(a, b, accuracy=1e-09)

Source from the content-addressed store, hash-verified

107
108
109def is_float_equal(a, b, accuracy=1e-09):
110 return abs(a - b) <= max(accuracy * max(abs(a), abs(b)), 0.0)
111
112
113def test_float(kv):

Callers 1

test_floatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected