C++ Logo

std-proposals

Advanced search

Re: [std-proposals] On the standardization of mp-units P3045R1

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Wed, 19 Jun 2024 09:27:50 +0200
You are arguing for only using zero-based units like K in composite units.   And you are right that those (as long as they are linear) can be used for absolute and relative use. The ideal gas law works with absolute temperature and with delta temperature increase.   So at least internally using Kelvin (and perhaps Rankine) simplifies some aspects.   Some questions remain however:    - Should this only be the internal representation or also a library user interface? (people use °C and definitely do not know °R!)  - What about units without a zero-based variant?  - What about non-linear units (logarithmic units, curved coordinates, vectors, depending on human perception or effect like phon, lumen, sievert or even more exotic ones)   At least the unit library should support those in a limited fashion  - without calculations  - expandable by the user or in a future standard proposal       -----Ursprüngliche Nachricht----- Von:Tiago Freire via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Mi 19.06.2024 09:03 Betreff:Re: [std-proposals] On the standardization of mp-units P3045R1 An:std-proposals_at_[hidden]; CC:Tiago Freire <tmiguelf_at_[hidden]>; > The only place I know of where °C or °F are used anywhere but temperature points and in deltas is in talking about specific heat capacity, which is usually written in J/(kg °C) even though that's the same as J kg⁻¹ K⁻¹. There may be some other weird units (like the aforementioned ns/√km or kWh/1000h), but nothing that would be as widespread. I think you are very close to the same realization that I have. Lets push this a little bit further. Lets say you wanted to define an absolute quantity with units J/(kg °C) what does that even mean? How do I convert a quantity_point in J/(kg °C) to a quantity_point J/(kg °K)? (which you can do with every other unit) Do I X J/(kg °C) = X J/(kg °K) + 273.15 J/(kg °K)? The answer is... no one would ever do this! Every single time that you see °C  combined with any other unit (like in J/(kg °C)) it always means the same thing as Kelvin. The only situation where you have °C and it is at an offset of 237.15 from absolute zero is when you are talking about an absolute temperature, a nowhere else EVER! A temperature of 15°C does not mean the same amount of stuff as a difference in temperature of 15°C. These 2 forms of °C are completely different units that apparently share the same name. It's a classification error! They are not the same thing! Because the difference between two temperatures expressed in °C is not a temperature in °C, it's a temperature in Kelvin! It always has been! But scientist are humans and also get confused! Stop them from ever being able to represent °C anywhere other than an absolute temperature, and they will never be wrong! -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-06-19 07:27:52