Skip to content
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

Conversion of °C/h #9

Open
lfoppiano opened this issue Oct 9, 2018 · 2 comments
Open

Conversion of °C/h #9

lfoppiano opened this issue Oct 9, 2018 · 2 comments

Comments

@lfoppiano
Copy link

Hi,
as suggested in https://github.com/unitsofmeasurement/uom-se/issues/202#issuecomment-425394070 I've tested the same behavioiur using seshat.

When I try to parse °C/h I get the exception: The scale of measurement for “°C” unit is not a ratio scale.. What does that means?

I would expect to have something like (x+273.15)*3600 (K/s).

What do you think?

Thank you
Luca

@desruisseaux
Copy link
Collaborator

The terminology follows the Levels of Measurement: nominal, ordinal, interval and ratio. A ratio scale is a scale without offset. For example m, km, K, N, etc. are ratio scales, but °C is not (it is an interval scale). When computing °C divided by something, there is currently no way to know if the value in °C is a quantity or an interval. In the former case 1°C/h = 374.15 K/h while in the later case 1°C/h = 1 K/h. Current Seshat implementation disable this case for avoiding surprising behavior, but we can revisit that if there is a need for it.

In the longer term, better support of such operations with °C would require an API change in JSR 385 in order to know if we shall interpret the numerator as a quantity or an interval. I think the subject is still on the table.

@keilw
Copy link
Member

keilw commented Oct 10, 2018

We hope to do this in Public Review if possible: unitsofmeasurement/unit-api#95
There are two main focus points aside from bugs or improvements over the last version:

  • format
  • function

Arithmetics and conversions would be "function", formatting or parsing tickets or new features for 2.0 like "Compound Formatting" are under "format".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants