Closed SimonHeybrock closed 1 year ago
I will have to think about how add prioritization for things like that. I suspect there is a bit of a bias in the code towards electrical engineering units ie kW over kJ.
I made a few tweaks that will prioritize the to_string
conversion with muplication/division of a single base unit over other possible conversions. That addresses the specific class of issues raised here. There is more things to be done in a similar fashion but that will take some tinkering, and I think I want to get another release out soon.
Thanks, and a release would indeed be appreciated 👍
A user reported a problem formatting units such as
kJ / mol
— this outputskW / kat
. This is unexpected, sincemol
is an SI base units, whereaskat
is not. I would have expected that the string formatting tries to stick to SI (or other) base units, before moving on to derived units.Obviously, both
J
andW
are derived, but is there a way to prefer string outputs with the smaller number of derived units, i.e., "1 derived + 1 base" should be chosen over "2 derived"?