MCPcopy Create free account
hub / github.com/LeapLabTHU/Absolute-Zero-Reasoner / numeric_equal

Function numeric_equal

evaluation/math_eval/eval/grader.py:266–273  ·  view source on GitHub ↗
(prediction: float, reference: float)

Source from the content-addressed store, hash-verified

264
265
266def numeric_equal(prediction: float, reference: float):
267 # Note that relative tolerance has significant impact
268 # on the result of the synthesized GSM-Hard dataset
269 # if reference.is_integer():
270 # return isclose(reference, round(prediction), abs_tol=1e-4)
271 # else:
272 # prediction = round(prediction, len(str(reference).split(".")[-1]))
273 return isclose(reference, prediction, rel_tol=1e-4)
274
275
276def symbolic_equal(a, b):

Callers 2

math_equalFunction · 0.85
symbolic_equalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected