au
au copied to clipboard
Solve most `[UNLABELED_UNIT]` instances by generating magnitude labels
Right now, the unit resulting from scaling a unit by a magnitude gets the default label, [UNLABELED_UNIT]
. It's important that it not have the same label as the unscaled unit. Still, we can do much better if we design magnitude labels: automatic string constants that represent magnitudes.
Possible examples:
-
"1 / 18"
-
"Pi / 180"
-
"5,280"
-
"(3 * sqrt(3)) / (5 * Pi)"
To solve this, we would need to come up with a collection of canonical examples we can use as acceptance tests, and work out the general rules. We also need to figure out how to handle things like parentheses, powers, and roots.