mathjs icon indicating copy to clipboard operation
mathjs copied to clipboard

Suggestion: use thousands of kilometres instead of "megameters" by default

Open zcohan opened this issue 6 years ago • 5 comments

At present:

1001 km = 1.001 Mm //megameters

I understand why MathJS evaluates the expression this way, given the standard SI prefix system for metric units.

However, scientists & regular people are much more likely to use thousands of kilometers than megameters. It would be nice if MathJS could make a practical exception from jumping to the next largest SI unit in this case.

zcohan avatar Mar 25 '19 10:03 zcohan

Yes that's true, we don't use megameters in practice. Makes sense to me to make a special rule for this in the function that finds the "best" prefix.

I'm thinking about whether there are other units which have a similar case. Maybe time in seconds? (I don't use megaseconds but I do use milliseconds for example?). More ideas?

josdejong avatar Mar 25 '19 19:03 josdejong

Also:

1001 kg = 1.001 Mg

Implementing #1314 would be nice and could address this issue as well :)

bornova avatar Mar 25 '19 22:03 bornova

Also:

1001 kg = 1.001 Mg

In most contexts (scientific, civil engineering, except perhaps for astronomy and particle physics), I would expect that to be communicated as 1.001 t tonnes (metric tons).

mgsternberg avatar Jun 27 '19 21:06 mgsternberg

The km versus Mm issue is resolved by UnitMath's commonPrefixes property for each unit, m in this case.

Choosing between kg and t is a little more subjective in my opinion, it could go either way. Possibly we could include a method that converts a unit to a different related unit of a more appropriate magnitude, but I don't think we would be able to meet everyone's expectations perfectly.

ericman314 avatar Jun 27 '19 22:06 ericman314

We need a place to house all these unit things until there is a good long-term way to deal with them. In any case, the points raised here are all still valid.

gwhitney avatar Oct 06 '23 04:10 gwhitney