MCPcopy Create free account
hub / github.com/THUDM/AgentBench / _is_float

Method _is_float

src/server/tasks/dbbench/result_processor.py:266–272  ·  view source on GitHub ↗

检查是否可以转换为浮点数

(value)

Source from the content-addressed store, hash-verified

264
265 @staticmethod
266 def _is_float(value):
267 """检查是否可以转换为浮点数"""
268 try:
269 float(value)
270 return True
271 except (ValueError, TypeError):
272 return False
273
274 @staticmethod
275 def _float_equal(a, b, tol=1e-2):

Callers 1

compare_resultsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected