C++ Logo

std-proposals

Advanced search

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

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Wed, 19 Jun 2024 08:29:00 +0000
Well, I think you are kind of seeing the problem. Units homeomorphic to 1 are a problem in the literature, they are a different kind of problem in a units library but it is orthogonal to the discussion, we should not be side tracked here.

From: Std-Proposals <std-proposals-bounces_at_[hidden]> On Behalf Of Sebastian Wittmeier via Std-Proposals
Sent: Wednesday, June 19, 2024 09:37
To: std-proposals_at_[hidden]
Cc: Sebastian Wittmeier <wittmeier_at_[hidden]>
Subject: Re: [std-proposals] On the standardization of mp-units P3045R1


In practice this rigorousness is (very often) not used and can get quite difficult to fully follow through.



Should pi get a unit? It can be a 180° angle, it can be a length of an arc. It is dependent on Geometry (Euclidian). There are geometries with sum of angles in a triangle less or greater than pi. Would you express the chosen geometry as a(nother) unit?



Ideally, the library allows both: Typical daily usage of units and customized more rigorous usage.

-----Ursprüngliche Nachricht-----
Von: Tiago Freire via Std-Proposals <std-proposals_at_[hidden]<mailto:std-proposals_at_[hidden]>>
Gesendet: Mi 19.06.2024 09:15
Betreff: Re: [std-proposals] On the standardization of mp-units P3045R1
An: std-proposals_at_lists.isocpp.org<mailto:std-proposals_at_[hidden]>;
CC: Tiago Freire <tmiguelf_at_[hidden]<mailto:tmiguelf_at_[hidden]>>;

Well, that’s because as you maybe figuring out scientist can be very sloppy with their units.



> Also, power should be measured in `W` but moment of force in `N * m`



You mean Torque. That’s because torque is actually `N * m / rad` and because torque is homeomorphic to 1 it just disappears and becomes `N * m`.

Where you to be rigorous you shouldn’t be able to just puff it out of existence.

My library actually does this to prevent this sort of confusion.



Same thing happens in Bq, there’s are actually supposed and additional unit of something that’s homeomorphic to 1 that just gets blasted out of existence.

It’s an orthogonal problem.

Received on 2024-06-19 08:29:04