-
Notifications
You must be signed in to change notification settings - Fork 392
Temperature arithmetic is wrong #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I follow what you say. I think in this case, the arithmetic of subtracting one temperature from the other cannot be thought of as an interval, but rather a new temperature. So in your example, subtracting 2K - 1K is not an interval of 1K, but a new temperature of 1K. |
The example shows what happens if you subtract a measured temperature from another measured temperture: You get a delta and not a new temperature.
The
with the current implementation I will get
|
I apologize, I finally got my head the right way around this. You are absolutely correct. In the analog of time, So back to the implementation proposal:
|
Would you be interested in doing a pull request on this? |
I am thinking about two new types named Extensions can be done for both:
I am not quite sure what naming convention we should follow here and what would be the one most people will know at first sight what is going on and what does it mean. Once we are both satisfied with the kids name I would like to offer a pull request to you :o) |
I am leaning towards keeping It would be a breaking change, but on the other hand, the behavior/semantics are simply wrong, so I would be fine doing this change without bumping the major version of the lib. I am currently looking into extending the generator scripts to support a |
Well thats fine for me. How would the naming convention look like for the number extensions (which I like very much). Somehow like:
|
Hm, I think the plural form |
My german ears are more accurate on german language - so we best follow your ears in this case ;o) |
Another possible option would be Well typing Do you feel we need both or would be Delta... enough? |
I was thinking the same thing, sure, |
I am making progress on the |
Also a property for |
See discussion in related issue. The semantics of the current Temperature arithmetic is plain wrong, such as adding 1 + 1 degrees Celsius is not 2 degrees Celsius, but rather +275.15 degrees Celsius. The problem is how we in speech mixi temperature delta/interval and temperature measurements, in contrast to time (DateTime vs TimeSpan, with different units). Refs #218 #218
See discussion in related issue. The semantics of the current Temperature arithmetic is plain wrong, such as adding 1 + 1 degrees Celsius is not 2 degrees Celsius, but rather +275.15 degrees Celsius. The problem is how we in speech mixi temperature delta/interval and temperature measurements, in contrast to time (DateTime vs TimeSpan, with different units). Refs #218 #218
See discussion in related issue. The semantics of the current Temperature arithmetic is plain wrong, such as adding 1 + 1 degrees Celsius is not 2 degrees Celsius, but rather +275.15 degrees Celsius. The problem is how we in speech mixi temperature delta/interval and temperature measurements, in contrast to time (DateTime vs TimeSpan, with different units). Refs #218 #218
Fix arithmetic for Temperature Default arithmetic with Temperature removed, they were plain wrong Custom arithmetic for Temperature and TemperatureDelta is added Add Temperature.Multiply() and .Divide(), easy to get wrong TemperatureDelta added with default arithmetic, which should cover the examples you gave above Fixes #218
According to https://en.wikipedia.org/wiki/Celsius#Temperatures_and_intervals
and further more at https://de.wikipedia.org/wiki/Grad_Celsius#Temperaturdifferenz (german)
And that will fail here
The text was updated successfully, but these errors were encountered: