You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a temperature difference in K to a temperature in °C, one often wants to have the result in °C as well. ContextUnits can be used to achieve this.
julia> x =5*ContextUnits(°C, °C)
5 °C
julia> x +3K
8//1 °C
However, the result has numerical type Rational{Int} even though Int would be just fine. The reason for this is that the + method in this case converts both quantities to K to add them before converting the result back to °C.
The text was updated successfully, but these errors were encountered:
When adding a temperature difference in
K
to a temperature in°C
, one often wants to have the result in°C
as well.ContextUnits
can be used to achieve this.However, the result has numerical type
Rational{Int}
even thoughInt
would be just fine. The reason for this is that the+
method in this case converts both quantities toK
to add them before converting the result back to°C
.The text was updated successfully, but these errors were encountered: