Replies: 1 comment
-
For reference, here is you question about unit systems: #3183 About temperatures, see:
About unit conversion: there is some logic that tries to return the result in as simple a unit as possible. In most of the cases that works very well, but like in your example you want more control. The current options for that are limited, see #3183. A hack to prevent the unit from being simplified to for example |
Beta Was this translation helpful? Give feedback.
-
Hello, I came across 2 different issues pertaining to units and I'm not sure if it's just a usage or configuration issue:
Issue 1:
I'm not sure why related units cause issues and what are the best practices in dealing with expressions involving related units
Issue 2:
automatic unit conversion is nice but it's also inconsistent for my needs. I have an API that runs MathJS expressions and returns an object containing the following props:
unit(output).toNumeric()
unit(output).formatUnits()
Example 1:
bmi(w,h) = w / h ^ 2; bmi(70kg, 1.5m)
Example 2:
2.3456 kg * 3.5 m/s^2
Why are the output units inconsistent with the output of
unit.formatUnits()
. Is there a way for the raw output to return8.21 (kg m) / s^2
.FYI, I tried
toSI()
and it is more consistent. However it doesn't allow for output to be shown in requested units. Example:(20degC to defF).toSI()
returns293.15 K
even though I requested Fahrenheit and Kelvin is not the norm in certain applications.Beta Was this translation helpful? Give feedback.
All reactions