mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-06 18:37:31 +08:00
Review follow-ups for numeric_equivalent and its web port:
- Limit exponents to two digits; "1.5e10000000" made Fraction
arithmetic block the event loop for about a minute.
- Treat a separator convention borrowed from the key as a preference,
not a proof: "-12.500" for "-12500.00" is now ambiguous instead of a
final "incorrect", since a comma-decimal learner may mean -12500.
- Accept "50%" for a bare "50" key, and two or more decimals that round
to a fraction key ("0.333" for "1/3").
- Allow at most one trailing unit word; prose ("5 or six"), symbols
("3²"), single letters and magnitude words ("Tausend") are no longer
dropped. Reject repeated signs ("--5").
- Use an absolute epsilon so large integer keys stay exact.
- Align Python and TS on ASCII digits, Unicode spaces and lower().
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>