What happens
When a value has no unit with a symbol, a trace writes the coherent unit spelled from its base units: detail::coherent_unit_text in include/formula-cpp/trace_render.hpp. With #12 this covers every dimensioned value without a symbol. A dimension with only negative exponents is spelled 1/X, so in the fraction number style a line can read:
At a glance, that reads as one fraction divided again: 20000/413 per 1/kg, or 20000/(413·1) per kg. The value is right; the spelling invites a misreading. The same happens for 1/s, 1/m^3, 1/(m s) and so on.
Expected
An inverse unit after a number cannot be read as part of the number. Options:
- negative exponents,
kg^-1 (already the caret style the spelling uses for powers);
- a
per form, per kg;
- keeping
1/kg only where the number is not a fraction.
The spelling is pinned in test/opaque_tests.cpp (coherent_unit_text) and in trace texts across the tests and guides; they change with it.
Note
This is a spelling choice, not a correctness bug. The issue is here to make that choice deliberately.
What happens
When a value has no unit with a symbol, a trace writes the coherent unit spelled from its base units:
detail::coherent_unit_textininclude/formula-cpp/trace_render.hpp. With #12 this covers every dimensioned value without a symbol. A dimension with only negative exponents is spelled1/X, so in the fraction number style a line can read:At a glance, that reads as one fraction divided again:
20000/413per1/kg, or20000/(413·1)per kg. The value is right; the spelling invites a misreading. The same happens for1/s,1/m^3,1/(m s)and so on.Expected
An inverse unit after a number cannot be read as part of the number. Options:
kg^-1(already the caret style the spelling uses for powers);perform,per kg;1/kgonly where the number is not a fraction.The spelling is pinned in
test/opaque_tests.cpp(coherent_unit_text) and in trace texts across the tests and guides; they change with it.Note
This is a spelling choice, not a correctness bug. The issue is here to make that choice deliberately.