(prediction: float, reference: float)
| 264 | |
| 265 | |
| 266 | def 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 | |
| 276 | def symbolic_equal(a, b): |
no outgoing calls
no test coverage detected