Measurment units bug?

Measurment units bug? - Can't add degreeC to the variable - Messages

#21 Posted: 9/17/2021 8:08:24 AM
Porschaka

Porschaka

2 likes in 5 posts.

Group: User

Wrote

Hello
I think the following can be done

Kelvin_Celsius.png

Best Regards

Carlos



I think it is the best solution for now, Thank you, Carlos!
1 users liked this post
Oscar Campo 9/17/2021 8:12:00 AM
#22 Posted: 9/17/2021 10:59:44 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Quick Units converter.

ConvertUnit.PNG
#23 Posted: 9/17/2021 2:41:27 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Jean, I have to ask you to stay on-topic.

There is clearly a bug, and since these units are non-linear you cannot bypass the issue with simple workarounds.

Using a parallel system of units might come in handy in some specific cases, but is useless if you cannot link it with other built-in units and check simensional inconsistencies.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Oscar Campo 9/17/2021 3:09:00 PM
#24 Posted: 9/17/2021 4:36:57 PM
Arie

Arie

93 likes in 285 posts.

Group: User

It may be a bug because it doesn't evaluate. But what should it evaluate to?
My argument would be 3016.65 degC!

bug.png



Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#25 Posted: 9/17/2021 5:07:41 PM
Arie

Arie

93 likes in 285 posts.

Group: User

Workaround that preserves units.

Also confirms my assertion above.

workaround.png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#26 Posted: 9/19/2021 11:46:58 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Multiplying a variable by a nonlinear unit seems to make SMath forget or ignore the definition of that variable in that cell. Thats a bug for sure.

However, if you store that multiplication in another variable and then evaluate that in another cell, the original variable is again in the context and the correct result is shown. Thus, separation of definition and display via storage in a new variable is a possible solution to the original problem.

If it is just about parallel usage of dimensional and non-dimensional quantities, then just swapping definitions might also help.
This means deriving the non-dimensional quantity from the dimensional one instead of the other way around.

Worksheet2.sm (7 KiB) downloaded 19 time(s).
Worksheet2.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
3 users liked this post
sergio 9/19/2021 2:18:00 PM, NDTM Amarasekera 9/19/2021 2:29:00 PM, Oscar Campo 9/19/2021 10:38:00 PM
  • New Posts New Posts
  • No New Posts No New Posts