Compare if two numeric strings represent the same value.
(str1: str, str2: str)
| 106 | return num_str |
| 107 | |
| 108 | def numerically_equal(str1: str, str2: str) -> bool: |
| 109 | """Compare if two numeric strings represent the same value.""" |
| 110 | try: |
| 111 | return abs(float(str1) - float(str2)) < 1e-10 |
| 112 | except: |
| 113 | return False |
| 114 | |
| 115 | def normalize_fraction(fraction_str: str) -> str: |
| 116 | """Helper function to normalize fractions.""" |