MCPcopy Create free account
hub / github.com/apache/fory / _same_float_value

Function _same_float_value

python/pyfory/converter.py:184–189  ·  view source on GitHub ↗
(left: float, right: float)

Source from the content-addressed store, hash-verified

182
183
184def _same_float_value(left: float, right: float) -> bool:
185 if math.isnan(left) or math.isnan(right):
186 return False
187 if left == 0.0 and right == 0.0:
188 return math.copysign(1.0, left) == math.copysign(1.0, right)
189 return left == right
190
191
192def _to_float32(value: float) -> float:

Callers 1

_float_valueFunction · 0.85

Calls 1

copysignMethod · 0.80

Tested by

no test coverage detected